Form/Type/UploadType.php
public function configureOptions(OptionsResolver $resolver)
    {
        $resolver
            ->setDefaults([
                'label'        => 'ekyna_core.field.file',
                'data_class'   => 'Ekyna\Bundle\CoreBundle\Entity\AbstractUpload',
                'file_path'    => 'path',
                'rename_field' => true,
                'unlink_field' => false,
                'js_upload'    => true,
                'error_bubbling' => false,
            ])
            ->setAllowedTypes('file_path',    ['null', 'string'])
            ->setAllowedTypes('rename_field', 'bool')
            ->setAllowedTypes('unlink_field', 'bool')
            ->setAllowedTypes('js_upload',    'bool')
        ;
    }
public function configureOptions(OptionsResolver $resolver)
    {
        $resolver
            ->setDefaults([
                'label'        => 'ekyna_core.field.file',
                'data_class'   => 'Ekyna\Bundle\CoreBundle\Entity\AbstractUpload',
                'file_path'    => 'path',
                'rename_field' => true,
                'unlink_field' => false,
                'js_upload'    => true,
                'error_bubbling' => false,
            ])
            ->setAllowedTypes('file_path',    ['null', 'string'])
            ->setAllowedTypes('rename_field', 'bool')
            ->setAllowedTypes('unlink_field', 'bool')
            ->setAllowedTypes('js_upload',    'bool')
        ;
    }
{@inheritdoc}