CollectionType.php 815 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. /*
  3. * This file is part of the Sonata Project 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. namespace Sonata\AdminBundle\Form\Type;
  11. use Symfony\Component\Form\AbstractType;
  12. /**
  13. * This type wrap native `collection` form type and render `add` and `delete`
  14. * buttons in standard Symfony` collection form type.
  15. *
  16. * @author Andrej Hudec <pulzarraider@gmail.com>
  17. */
  18. class CollectionType extends AbstractType
  19. {
  20. /**
  21. * {@inheritdoc}
  22. */
  23. public function getParent()
  24. {
  25. return 'collection';
  26. }
  27. /**
  28. * {@inheritdoc}
  29. */
  30. public function getName()
  31. {
  32. return 'sonata_type_native_collection';
  33. }
  34. }