function RoutePreloader::getSubscribedEvents
Same name in other branches
- 9 core/lib/Drupal/Core/Routing/RoutePreloader.php \Drupal\Core\Routing\RoutePreloader::getSubscribedEvents()
- 8.9.x core/lib/Drupal/Core/Routing/RoutePreloader.php \Drupal\Core\Routing\RoutePreloader::getSubscribedEvents()
- 10 core/lib/Drupal/Core/Routing/RoutePreloader.php \Drupal\Core\Routing\RoutePreloader::getSubscribedEvents()
File
-
core/
lib/ Drupal/ Core/ Routing/ RoutePreloader.php, line 86
Class
- RoutePreloader
- Defines a class that can pre-load non-admin routes.
Namespace
Drupal\Core\RoutingCode
public static function getSubscribedEvents() : array {
// Set a really low priority to catch as many as possible routes.
$events[RoutingEvents::ALTER] = [
'onAlterRoutes',
-1024,
];
$events[RoutingEvents::FINISHED] = [
'onFinishedRoutes',
];
// Load the routes before the controller is executed (which happens after
// the kernel request event).
$events[KernelEvents::REQUEST][] = [
'onRequest',
];
return $events;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.