SemesterType::configureOptions()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 5
c 0
b 0
f 0
rs 10
cc 1
nc 1
nop 1
1
<?php
2
3
/*
4
 * This file is part of the thealternativezurich/feedback project.
5
 *
6
 * (c) Florian Moser <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace App\Form\Semester;
13
14
use App\Entity\Semester;
15
use Symfony\Component\Form\AbstractType;
16
use Symfony\Component\Form\Extension\Core\Type\TextType;
17
use Symfony\Component\Form\FormBuilderInterface;
18
use Symfony\Component\OptionsResolver\OptionsResolver;
19
20
class SemesterType extends AbstractType
21
{
22
    public function buildForm(FormBuilderInterface $builder, array $options)
23
    {
24
        $builder->add('name', TextType::class);
25
    }
26
27
    public function configureOptions(OptionsResolver $resolver)
28
    {
29
        $resolver->setDefaults([
30
            'data_class' => Semester::class,
31
            'translation_domain' => 'entity_semester',
32
        ]);
33
    }
34
}
35