UserType   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 3
Bugs 0 Features 0
Metric Value
wmc 1
c 3
b 0
f 0
lcom 0
cbo 2
dl 0
loc 38
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
B buildForm() 0 32 1
1
<?php
2
3
namespace DoS\UserBundle\Form\Type;
4
5
use Sylius\Bundle\UserBundle\Form\Type\UserType as BaseUserType;
6
use Symfony\Component\Form\FormBuilderInterface;
7
8
class UserType extends BaseUserType
9
{
10
    /**
11
     * {@inheritdoc}
12
     */
13
    public function buildForm(FormBuilderInterface $builder, array $options)
14
    {
15
        $builder
16
            ->add('plainPassword', 'password', array(
17
                'label' => 'sylius.form.user.password.label',
18
                'required' => false,
19
            ))
20
            ->add('enabled', 'checkbox', array(
21
                'label' => 'sylius.form.user.enabled',
22
                'required' => false,
23
            ))
24
        ;
25
26
        $builder
27
            ->add('locale', 'locale', array(
28
                'label' => 'dos.form.user.locale',
29
                'required' => false
30
            ))
31
32
            ->add('displayname', 'text', array(
33
                'label' => 'dos.form.user.displayname',
34
                'required' => false
35
            ))
36
37
            ->add('authorizationRoles', 'sylius_role_choice', array(
38
                'label' => 'sylius.form.user.roles',
39
                'multiple' => true,
40
                'expanded' => true,
41
                'required' => false
42
            ))
43
        ;
44
    }
45
}
46