1 | <?php |
||
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() |
||
50 | } |
||
51 |