You are here

protected function TeamRouteProvider::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 EdgeEntityRouteProvider::getCanonicalRoute

File

modules/apigee_edge_teams/src/Entity/TeamRouteProvider.php, line 68

Class

TeamRouteProvider
Team specific dynamic entity route provider.

Namespace

Drupal\apigee_edge_teams\Entity

Code

protected function getCanonicalRoute(EntityTypeInterface $entity_type) {
  $route = parent::getCanonicalRoute($entity_type);

  // Set the corresponding developer route.
  $route
    ->setOption(TeamContextManagerInterface::DEVELOPER_ROUTE_OPTION_NAME, 'entity.user.canonical');
  return $route;
}