VideoSearchType::getBlockPrefix()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
eloc 1
nc 1
nop 0
1
<?php
2
3
namespace AppBundle\Form;
4
5
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
6
use Symfony\Component\Form\AbstractType;
7
use Symfony\Component\Form\FormBuilderInterface;
8
use Symfony\Component\OptionsResolver\OptionsResolver;
9
10
class VideoSearchType extends AbstractType
11
{
12
    /**
13
     * {@inheritdoc}
14
     */
15
    public function buildForm(FormBuilderInterface $builder, array $options)
16
    {
17
        $builder
18
            ->add('title', null, ['label' => 'form_create.title'])
19
            ->add('tags', EntityType::class, array(
20
                'class' => 'AppBundle:Tag',
21
                'choice_label' => 'name',
22
                'multiple' => true,
23
                'label' => 'form_create.categories',
24
            ))
25
            ->add('description');
26
    }
27
28
    /**
29
     * {@inheritdoc}
30
     */
31
    public function configureOptions(OptionsResolver $resolver)
32
    {
33
        $resolver->setDefaults(array(
34
            'method' => 'GET',
35
            'required' => false,
36
            'translation_domain' => 'video',
37
        ));
38
    }
39
40
    /**
41
     * {@inheritdoc}
42
     */
43
    public function getBlockPrefix()
44
    {
45
        return 'appbundle_video';
46
    }
47
}
48