function AdminRouteSubscriber::getSubscribedEvents
Same name in other branches
- 9 core/modules/system/src/EventSubscriber/AdminRouteSubscriber.php \Drupal\system\EventSubscriber\AdminRouteSubscriber::getSubscribedEvents()
- 8.9.x core/modules/system/src/EventSubscriber/AdminRouteSubscriber.php \Drupal\system\EventSubscriber\AdminRouteSubscriber::getSubscribedEvents()
- 11.x core/modules/system/src/EventSubscriber/AdminRouteSubscriber.php \Drupal\system\EventSubscriber\AdminRouteSubscriber::getSubscribedEvents()
Overrides RouteSubscriberBase::getSubscribedEvents
File
-
core/
modules/ system/ src/ EventSubscriber/ AdminRouteSubscriber.php, line 30
Class
- AdminRouteSubscriber
- Adds the _admin_route option to each admin HTML route.
Namespace
Drupal\system\EventSubscriberCode
public static function getSubscribedEvents() : array {
$events = parent::getSubscribedEvents();
// Use a lower priority than \Drupal\field_ui\Routing\RouteSubscriber or
// \Drupal\views\EventSubscriber\RouteSubscriber to ensure we add the option
// to their routes.
$events[RoutingEvents::ALTER] = [
'onAlterRoutes',
-200,
];
return $events;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.