You are here

protected function EdgeEntityRouteProvider::getCanonicalRoute in Apigee Edge 8

Gets the canonical route.

Parameters

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

Return value

\Symfony\Component\Routing\Route|null The generated route, if available.

Overrides DefaultHtmlRouteProvider::getCanonicalRoute

1 call to EdgeEntityRouteProvider::getCanonicalRoute()
TeamRouteProvider::getCanonicalRoute in modules/apigee_edge_teams/src/Entity/TeamRouteProvider.php
Gets the canonical route.
1 method overrides EdgeEntityRouteProvider::getCanonicalRoute()
TeamRouteProvider::getCanonicalRoute in modules/apigee_edge_teams/src/Entity/TeamRouteProvider.php
Gets the canonical route.

File

src/Entity/EdgeEntityRouteProvider.php, line 34

Class

EdgeEntityRouteProvider
Default route provider for Apigee Edge entities.

Namespace

Drupal\apigee_edge\Entity

Code

protected function getCanonicalRoute(EntityTypeInterface $entity_type) {
  $route = parent::getCanonicalRoute($entity_type);
  if ($route) {
    $route
      ->setDefault('_title_callback', EdgeEntityTitleProvider::class . '::title');
  }
  return $route;
}