EntityRouteProviderInterface.php

Same filename in other branches
  1. 9 core/lib/Drupal/Core/Entity/Routing/EntityRouteProviderInterface.php
  2. 8.9.x core/lib/Drupal/Core/Entity/Routing/EntityRouteProviderInterface.php
  3. 11.x core/lib/Drupal/Core/Entity/Routing/EntityRouteProviderInterface.php

Namespace

Drupal\Core\Entity\Routing

File

core/lib/Drupal/Core/Entity/Routing/EntityRouteProviderInterface.php

View source
<?php

namespace Drupal\Core\Entity\Routing;

use Drupal\Core\Entity\EntityTypeInterface;

/**
 * Allows entity types to provide routes.
 */
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);

}

Interfaces

Title Deprecated Summary
EntityRouteProviderInterface Allows entity types to provide routes.

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