You are here

protected function TeamAppDevelRouteFixerSubscriber::alterRoutes in Apigee Edge 8

Alters existing routes for a specific collection.

Parameters

\Symfony\Component\Routing\RouteCollection $collection: The route collection for adding routes.

Overrides RouteSubscriberBase::alterRoutes

File

modules/apigee_edge_teams/src/Routing/TeamAppDevelRouteFixerSubscriber.php, line 57

Class

TeamAppDevelRouteFixerSubscriber
Fixes the entity routes generated by the Devel module.

Namespace

Drupal\apigee_edge_teams\Routing

Code

protected function alterRoutes(RouteCollection $collection) {
  if ($this->moduleHandler
    ->moduleExists('devel')) {
    foreach ($collection as $id => $route) {
      if (strpos($id, 'entity.team_app.devel') === 0) {
        $route
          ->setOption('_devel_entity_type_id', 'app');
      }
    }
  }
}