You are here

protected function TestRouteSubscriber::alterRoutes in Devel 4.x

Same name and namespace in other branches
  1. 8.3 tests/modules/devel_test/src/Routing/TestRouteSubscriber.php \Drupal\devel_test\Routing\TestRouteSubscriber::alterRoutes()
  2. 8 tests/modules/devel_test/src/Routing/TestRouteSubscriber.php \Drupal\devel_test\Routing\TestRouteSubscriber::alterRoutes()
  3. 8.2 tests/modules/devel_test/src/Routing/TestRouteSubscriber.php \Drupal\devel_test\Routing\TestRouteSubscriber::alterRoutes()

Alters existing routes for a specific collection.

Parameters

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

Overrides RouteSubscriberBase::alterRoutes

File

tests/modules/devel_test/src/Routing/TestRouteSubscriber.php, line 34

Class

TestRouteSubscriber
Router subscriber class for testing purpose.

Namespace

Drupal\devel_test\Routing

Code

protected function alterRoutes(RouteCollection $collection) {
  $this->state
    ->set('devel_test_route_rebuild', 'Router rebuild fired');
}