You are here

protected function TeamRoleRouteProvider::getCollectionRoute in Apigee Edge 8

Gets the collection 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::getCollectionRoute

File

modules/apigee_edge_teams/src/Entity/TeamRoleRouteProvider.php, line 34

Class

TeamRoleRouteProvider
Route provider for team roles.

Namespace

Drupal\apigee_edge_teams\Entity

Code

protected function getCollectionRoute(EntityTypeInterface $entity_type) {
  $route = parent::getCollectionRoute($entity_type);
  if ($route) {
    $defaults = $route
      ->getDefaults();
    unset($defaults['_title_callback']);
    $defaults['_title'] = 'Roles';
    $route
      ->setDefaults($defaults);
  }
  return $route;
}