for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace AppBundle\Form;
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Vich\UploaderBundle\Form\Type\VichFileType;
class VideoFileType extends AbstractType
{
/**
* {@inheritdoc}
*/
public function buildForm(FormBuilderInterface $builder, array $options)
$builder
->add('videoFile', VichFileType::class, [
'allow_delete' => false,
'required' => true,
'label' => 'form_create.file',
]);
}
public function configureOptions(OptionsResolver $resolver)
$resolver->setDefaults(array(
'data_class' => 'AppBundle\Entity\Video',
'translation_domain' => 'video',
));
public function getBlockPrefix()
return 'appbundle_video';