UserActionsType::setDefaultOptions()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 8
rs 9.4285
cc 1
eloc 3
nc 1
nop 1
1
<?php
2
3
4
namespace Tahoe\Bundle\MultiTenancyBundle\Form\Type;
5
6
7
use Symfony\Component\Form\AbstractType;
8
use Symfony\Component\Form\FormBuilderInterface;
9
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
10
11
class UserActionsType extends AbstractType {
12
13
    /**
14
     * {@inheritdoc}
15
     */
16
    public function buildForm(FormBuilderInterface $builder, array $options)
17
    {
18
        $builder
19
            ->add('promote', 'submit')
20
            ->add('demote', 'submit')
21
            ->add('remove', 'submit');
22
23
    }
24
25
    /**
26
     * @param OptionsResolverInterface $resolver
27
     */
28
    public function setDefaultOptions(OptionsResolverInterface $resolver)
29
    {
30
        $resolver->setDefaults(
31
            array(
32
33
            )
34
        );
35
    }
36
37
    /**
38
     * Returns the name of this type.
39
     *
40
     * @return string The name of this type
41
     */
42
    public function getName()
43
    {
44
        return 'user_actions_form';
45
    }
46
}