Guest User

Untitled

a guest
Jan 22nd, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. <?php
  2.  
  3. namespace Acme\DemoBundle\Form;
  4.  
  5. use Symfony\Component\Form\AbstractType;
  6. use Symfony\Component\Form\FormBuilder;
  7.  
  8. class ContactType extends AbstractType
  9. {
  10. public function buildForm(FormBuilder $builder, array $options)
  11. {
  12. $builder->add('something', 'repeated', array('type' => 'text'));
  13. $builder->add('message', 'textarea');
  14. }
  15.  
  16. public function getDefaultOptions(array $options)
  17. {
  18. return array(
  19. 'data_class' => 'Acme\DemoBundle\Entity\Contact'
  20. );
  21. }
  22.  
  23. public function getName()
  24. {
  25. return 'contact';
  26. }
  27. }
Add Comment
Please, Sign In to add comment