EntityRouteProviderInterface.php 612 B

123456789101112131415161718192021222324
  1. <?php
  2. namespace Drupal\Core\Entity\Routing;
  3. use Drupal\Core\Entity\EntityTypeInterface;
  4. /**
  5. * Allows entity types to provide routes.
  6. */
  7. interface EntityRouteProviderInterface {
  8. /**
  9. * Provides routes for entities.
  10. *
  11. * @param \Drupal\Core\Entity\EntityTypeInterface $entity_type
  12. * The entity type
  13. *
  14. * @return \Symfony\Component\Routing\RouteCollection|\Symfony\Component\Routing\Route[]
  15. * Returns a route collection or an array of routes keyed by name, like
  16. * route_callbacks inside 'routing.yml' files.
  17. */
  18. public function getRoutes(EntityTypeInterface $entity_type);
  19. }