You are here

protected function TestRouteSubscriber::alterRoutes in Devel 8.2

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. 4.x 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 16

Class

TestRouteSubscriber
Router subscriber class for testing purpose.

Namespace

Drupal\devel_test\Routing

Code

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