EntityLoaderInterface.php 821 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  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 Symfony\Bridge\Doctrine\Form\ChoiceList;
  11. /**
  12. * Custom loader for entities in the choice list.
  13. *
  14. * @author Benjamin Eberlei <kontakt@beberlei.de>
  15. */
  16. interface EntityLoaderInterface
  17. {
  18. /**
  19. * Returns an array of entities that are valid choices in the corresponding choice list.
  20. *
  21. * @return array The entities
  22. */
  23. public function getEntities();
  24. /**
  25. * Returns an array of entities matching the given identifiers.
  26. *
  27. * @return array The entities
  28. */
  29. public function getEntitiesByIds(string $identifier, array $values);
  30. }