Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace MY\Bundle\Form\Post;
- use Symfony\Component\Form\AbstractType;
- use Symfony\Component\Form\FormBuilderInterface;
- use Symfony\Component\OptionsResolver\OptionsResolverInterface;
- class GalleryImageType extends AbstractType
- {
- /**
- * @param FormBuilderInterface $builder
- * @param array $options
- */
- public function buildForm(FormBuilderInterface $builder, array $options)
- {
- $builder
- ->add('image', 'file')
- ;
- }
- /**
- * @param OptionsResolverInterface $resolver
- */
- public function setDefaultOptions(OptionsResolverInterface $resolver)
- {
- $resolver->setDefaults(array(
- 'data_class' => 'My\Bundle\Entity\Post\GalleryImage'
- ));
- }
- /**
- * @return string
- */
- public function getName()
- {
- return 'gallery_image';
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement