You are here

interface EntityRouteProviderInterface in Drupal 8

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Entity/Routing/EntityRouteProviderInterface.php \Drupal\Core\Entity\Routing\EntityRouteProviderInterface

Allows entity types to provide routes.

Hierarchy

Expanded class hierarchy of EntityRouteProviderInterface

All classes that implement EntityRouteProviderInterface

3 files declare their use of EntityRouteProviderInterface
EntityModerationRouteProvider.php in core/modules/content_moderation/src/Entity/Routing/EntityModerationRouteProvider.php
NodeRouteProvider.php in core/modules/node/src/Entity/NodeRouteProvider.php
UserRouteProvider.php in core/modules/user/src/Entity/UserRouteProvider.php

File

core/lib/Drupal/Core/Entity/Routing/EntityRouteProviderInterface.php, line 10

Namespace

Drupal\Core\Entity\Routing
View source
interface EntityRouteProviderInterface {

  /**
   * Provides routes for entities.
   *
   * @param \Drupal\Core\Entity\EntityTypeInterface $entity_type
   *   The entity type
   *
   * @return \Symfony\Component\Routing\RouteCollection|\Symfony\Component\Routing\Route[]
   *   Returns a route collection or an array of routes keyed by name, like
   *   route_callbacks inside 'routing.yml' files.
   */
  public function getRoutes(EntityTypeInterface $entity_type);

}

Members

Namesort descending Modifiers Type Description Overrides
EntityRouteProviderInterface::getRoutes public function Provides routes for entities. 4