protected function RouteSubscriber::alterRoutes in Total Control Admin Dashboard 8.2
Same name and namespace in other branches
- 3.0.x src/Routing/RouteSubscriber.php \Drupal\total_control\Routing\RouteSubscriber::alterRoutes()
Alters existing routes for a specific collection.
Parameters
\Symfony\Component\Routing\RouteCollection $collection: The route collection for adding routes.
Overrides RouteSubscriberBase::alterRoutes
File
- src/
Routing/ RouteSubscriber.php, line 17
Class
- RouteSubscriber
- Listens to the dynamic route events.
Namespace
Drupal\total_control\RoutingCode
protected function alterRoutes(RouteCollection $collection) {
if ($route = $collection
->get('page_manager.page_view_total_control_dashboard_total_control_dashboard-http_status_code-0')) {
$route
->setRequirement('_permission', 'have total control');
}
}