You are here

protected function DeveloperAppRouteProvider::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

src/Entity/DeveloperAppRouteProvider.php, line 106

Class

DeveloperAppRouteProvider
Default entity routes for developer apps.

Namespace

Drupal\apigee_edge\Entity

Code

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

    // Add "access developer_app overview" to the autogenerated permission
    // requirement" (that contains "administer developer_app").
    $route
      ->setRequirement('_permission', $route
      ->getRequirement('_permission') . '+access developer_app overview');
  }
  return $route;
}