| 1: | <?php |
| 2: | namespace TIC\AcmeBundle\Form; |
| 3: | |
| 4: | use TIC\CoreBundle\Base\TICFormType as BaseType; |
| 5: | |
| 6: | use Symfony\Component\Form\FormBuilderInterface; |
| 7: | use Symfony\Component\OptionsResolver\OptionsResolver; |
| 8: | |
| 9: | use TIC\AcmeBundle\Entity\FooBar as FormEntity; |
| 10: | |
| 11: | |
| 12: | |
| 13: | |
| 14: | class FooBarType extends BaseType |
| 15: | { |
| 16: | |
| 17: | public function configureOptions(OptionsResolver $resolver) |
| 18: | { |
| 19: | $resolver->setDefaults([ |
| 20: | 'data_class' => $this->entityClass, |
| 21: | ]); |
| 22: | } |
| 23: | |
| 24: | public function buildForm(FormBuilderInterface $builder, array $options) |
| 25: | { |
| 26: | $builder |
| 27: | ->add('name') |
| 28: | ; |
| 29: | } |
| 30: | |
| 31: | } |