TestRouteSubscriber.php in Devel 8.2
Namespace
Drupal\devel_test\RoutingFile
tests/modules/devel_test/src/Routing/TestRouteSubscriber.phpView source
<?php
namespace Drupal\devel_test\Routing;
use Drupal\Core\Routing\RouteSubscriberBase;
use Symfony\Component\Routing\RouteCollection;
/**
* Router subscriber class for testing purpose.
*/
class TestRouteSubscriber extends RouteSubscriberBase {
/**
* {@inheritdoc}
*/
protected function alterRoutes(RouteCollection $collection) {
\Drupal::state()
->set('devel_test_route_rebuild', 'Router rebuild fired');
}
}
Classes
Name | Description |
---|---|
TestRouteSubscriber | Router subscriber class for testing purpose. |