InvitationType::setDefaultOptions()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 4

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 4
nc 1
nop 1
1
<?php
2
3
namespace Tahoe\Bundle\MultiTenancyBundle\Form;
4
5
use Symfony\Component\Form\AbstractType;
6
use Symfony\Component\Form\FormBuilderInterface;
7
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
8
9
class InvitationType extends AbstractType
10
{
11
    /**
12
     * @param FormBuilderInterface $builder
13
     * @param array                $options
14
     */
15
    public function buildForm(FormBuilderInterface $builder, array $options)
16
    {
17
        $builder
18
            ->add('email')
19
        ;
20
    }
21
22
    /**
23
     * @param OptionsResolverInterface $resolver
24
     */
25
    public function setDefaultOptions(OptionsResolverInterface $resolver)
26
    {
27
        $resolver->setDefaults(
28
            array(
29
                'data_class' => 'Tahoe\Bundle\MultiTenancyBundle\Entity\Invitation'
30
            )
31
        );
32
    }
33
34
    /**
35
     * @return string
36
     */
37
    public function getName()
38
    {
39
        return 'invitation_form';
40
    }
41
}
42