Passed
Push — master ( 419cb0...e1d6fa )
by Anthony
02:38
created

User::buildForm()   B

Complexity

Conditions 1
Paths 1

Size

Total Lines 26
Code Lines 19

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 19
nc 1
nop 2
dl 0
loc 26
rs 8.8571
c 0
b 0
f 0
1
<?php
2
3
namespace PiouPiou\RibsAdminBundle\Form;
4
5
use Symfony\Component\Form\AbstractType;
6
use Symfony\Component\Form\Extension\Core\Type\TextType;
7
use Symfony\Component\Form\FormBuilderInterface;
8
use Symfony\Component\OptionsResolver\OptionsResolver;
9
10
class User extends AbstractType
11
{
12
	public function buildForm(FormBuilderInterface $builder, array $options)
13
	{
14
		$builder
15
			->add('firstname', TextType::class, [
16
				'label' => 'Firstname',
17
				'label_attr' => [
18
					'class' => 'label'
19
				],
20
				'attr' => [],
21
				'required' => true
22
			])
23
			->add('lastname', TextType::class, [
24
				'label' => 'lastname',
25
				'label_attr' => [
26
					'class' => 'label'
27
				],
28
				'attr' => [],
29
				'required' => true
30
			])
31
			->add('accessRightList', TextType::class, [
32
				'label' => 'lastname',
33
				'label_attr' => [
34
					'class' => 'label'
35
				],
36
				'attr' => [],
37
				'required' => true
38
			]);
39
	}
40
	
41
	public function configureOptions(OptionsResolver $resolver)
42
	{
43
		$resolver->setDefaults([
44
			'data_class' => \PiouPiou\RibsAdminBundle\Entity\User::class,
45
		]);
46
	}
47
}