MediaShowType::getName()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
c 1
b 1
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: Rafidion Michael
5
 * Date: 18/11/2014
6
 * Time: 01:22
7
 */
8
9
namespace Mykees\MediaBundle\Form\Type;
10
11
use Symfony\Component\Form\AbstractType;
12
use Symfony\Component\Form\FormBuilderInterface;
13
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
14
15
class MediaShowType extends AbstractType
16
{
17
    /**
18
     * @param FormBuilderInterface $builder
19
     * @param array $options
20
     */
21
    public function buildForm(FormBuilderInterface $builder, array $options)
22
    {
23
        $builder
24
            ->add('name','text',[
25
                "label"=>"Nom de l'image"
26
            ])
27
            ->add('file','text',[
28
                "label"=>"Chemin de l'image"
29
            ])
30
        ;
31
    }
32
33
    /**
34
     * @param OptionsResolverInterface $resolver
35
     */
36
    public function setDefaultOptions(OptionsResolverInterface $resolver)
37
    {
38
        $resolver->setDefaults(array(
39
            'data_class' => 'Mykees\MediaBundle\Entity\Media'
40
        ));
41
    }
42
43
    /**
44
     * @return string
45
     */
46
    public function getName()
47
    {
48
        return 'mykees_mediabundle_show';
49
    }
50
}
51