interface EntityRouteProviderInterface

Same name in other branches
  1. 9 core/lib/Drupal/Core/Entity/Routing/EntityRouteProviderInterface.php \Drupal\Core\Entity\Routing\EntityRouteProviderInterface
  2. 8.9.x core/lib/Drupal/Core/Entity/Routing/EntityRouteProviderInterface.php \Drupal\Core\Entity\Routing\EntityRouteProviderInterface
  3. 10 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

5 files declare their use of EntityRouteProviderInterface
EntityModerationRouteProvider.php in core/modules/content_moderation/src/Entity/Routing/EntityModerationRouteProvider.php
EntityPermissionsRouteProvider.php in core/modules/user/src/Entity/EntityPermissionsRouteProvider.php
FileRouteProvider.php in core/modules/file/src/Entity/FileRouteProvider.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

Title Sort descending Modifiers Object type Summary Overrides
EntityRouteProviderInterface::getRoutes public function Provides routes for entities. 7

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.