CollectionType.php 810 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. /*
  3. * This file is part of the Sonata package.
  4. *
  5. * (c) Thomas Rabaix <thomas.rabaix@sonata-project.org>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. *
  10. */
  11. namespace Sonata\AdminBundle\Form\Type;
  12. use Symfony\Component\Form\AbstractType;
  13. /**
  14. * This type wrap native `collection` form type and render `add` and `delete`
  15. * buttons in standard Symfony` collection form type.
  16. *
  17. * @author Andrej Hudec <pulzarraider@gmail.com>
  18. */
  19. class CollectionType extends AbstractType
  20. {
  21. /**
  22. * {@inheritDoc}
  23. */
  24. public function getParent()
  25. {
  26. return 'collection';
  27. }
  28. /**
  29. * {@inheritDoc}
  30. */
  31. public function getName()
  32. {
  33. return 'sonata_type_native_collection';
  34. }
  35. }