SerieType::configureOptions()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7

Duplication

Lines 7
Ratio 100 %

Importance

Changes 0
Metric Value
dl 7
loc 7
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
namespace KI\PonthubBundle\Form;
4
5
use KI\CoreBundle\Selector\ImageSelector;
6
use KI\CoreBundle\Selector\TagsSelector;
7
use KI\PonthubBundle\Entity\Serie;
8
use KI\PonthubBundle\Selector\ActorsSelector;
9
use KI\PonthubBundle\Selector\GenresSelector;
10
use Symfony\Component\Form\AbstractType;
11
use Symfony\Component\Form\FormBuilderInterface;
12
use Symfony\Component\OptionsResolver\OptionsResolver;
13
14 View Code Duplication
class SerieType extends AbstractType
15
{
16
    public function buildForm(FormBuilderInterface $builder, array $options)
17
    {
18
        $builder
19
            ->add('name')
20
            ->add('description')
21
            ->add('actors', ActorsSelector::class)
22
            ->add('genres', GenresSelector::class)
23
            ->add('tags', TagsSelector::class)
24
            ->add('duration')
25
            ->add('director')
26
            ->add('rating')
27
            ->add('year')
28
            ->add('image', ImageSelector::class)
29
        ;
30
    }
31
32
    public function configureOptions(OptionsResolver $resolver)
33
    {
34
        $resolver->setDefaults([
35
            'csrf_protection' => false,
36
            'data_class' => Serie::class
37
        ]);
38
    }
39
40
    public function getBlockPrefix()
41
    {
42
        return '';
43
    }
44
}
45