You are here

public function AppRouteProvider::getRoutes in Apigee Edge 8

Provides routes for entities.

Parameters

\Drupal\Core\Entity\EntityTypeInterface $entity_type: The entity type

Return value

\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.

Overrides DefaultHtmlRouteProvider::getRoutes

2 calls to AppRouteProvider::getRoutes()
DeveloperAppRouteProvider::getRoutes in src/Entity/DeveloperAppRouteProvider.php
Provides routes for entities.
TeamAppRouteProvider::getRoutes in modules/apigee_edge_teams/src/Entity/TeamAppRouteProvider.php
Provides routes for entities.
2 methods override AppRouteProvider::getRoutes()
DeveloperAppRouteProvider::getRoutes in src/Entity/DeveloperAppRouteProvider.php
Provides routes for entities.
TeamAppRouteProvider::getRoutes in modules/apigee_edge_teams/src/Entity/TeamAppRouteProvider.php
Provides routes for entities.

File

src/Entity/AppRouteProvider.php, line 34

Class

AppRouteProvider
Developer- and company (team) app specific route overrides and additions.

Namespace

Drupal\apigee_edge\Entity

Code

public function getRoutes(EntityTypeInterface $entity_type) {
  $collection = parent::getRoutes($entity_type);
  $entity_type_id = $entity_type
    ->id();
  if ($analytics_route = $this
    ->getAnalyticsRoute($entity_type)) {
    $collection
      ->add("entity.{$entity_type_id}.analytics", $analytics_route);
  }
  return $collection;
}