public static function WorkspaceRequestSubscriber::getSubscribedEvents in Drupal 10
Same name and namespace in other branches
- 8 core/modules/workspaces/src/EventSubscriber/WorkspaceRequestSubscriber.php \Drupal\workspaces\EventSubscriber\WorkspaceRequestSubscriber::getSubscribedEvents()
- 9 core/modules/workspaces/src/EventSubscriber/WorkspaceRequestSubscriber.php \Drupal\workspaces\EventSubscriber\WorkspaceRequestSubscriber::getSubscribedEvents()
File
- core/
modules/ workspaces/ src/ EventSubscriber/ WorkspaceRequestSubscriber.php, line 98
Class
- WorkspaceRequestSubscriber
- Provides a event subscriber for setting workspace-specific cache keys.
Namespace
Drupal\workspaces\EventSubscriberCode
public static function getSubscribedEvents() : array {
// Use a priority of 190 in order to run after the generic core subscriber.
// @see \Drupal\Core\EventSubscriber\PathSubscriber::getSubscribedEvents()
$events[KernelEvents::CONTROLLER][] = [
'onKernelController',
190,
];
// Use a priority of 33 in order to run before Symfony's router listener.
// @see \Symfony\Component\HttpKernel\EventListener\RouterListener::getSubscribedEvents()
$events[KernelEvents::REQUEST][] = [
'onKernelRequest',
33,
];
return $events;
}