Guest User

Untitled

a guest
Oct 10th, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. <?php
  2.  
  3. namespace BlackRook\TaskBundle\Form;
  4.  
  5. use Symfony\Component\Form\AbstractType;
  6. use Symfony\Component\Form\FormBuilder;
  7.  
  8. class TasksType extends AbstractType
  9. {
  10. public function buildForm(FormBuilder $builder, array $options)
  11. {
  12. $builder
  13. ->add('tasks', 'collection', array(
  14. "type" => new TaskType(),
  15. "allow_add" => true,
  16. "prototype" => true,
  17. "allow_delete" => true,
  18. ));
  19. }
  20.  
  21. public function getName()
  22. {
  23. return 'tasks';
  24. }
  25.  
  26. }
Advertisement
Add Comment
Please, Sign In to add comment