TagFavoritesForm.php 607B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. namespace Muzich\CoreBundle\Form\Tag;
  3. use Symfony\Component\Form\AbstractType;
  4. use Symfony\Component\Form\FormBuilder;
  5. class TagFavoritesForm extends AbstractType
  6. {
  7. public function buildForm(FormBuilder $builder, array $options)
  8. {
  9. $builder->add('tags', 'choice', array(
  10. 'choices' => $options['tags'],
  11. 'expanded' => true,
  12. 'multiple' => true
  13. ));
  14. }
  15. public function getName()
  16. {
  17. return 'tag_favorites_form';
  18. }
  19. public function getDefaultOptions(array $options)
  20. {
  21. return array(
  22. 'tags' => array(),
  23. );
  24. }
  25. }