public static function WorkspaceRequestSubscriber::getSubscribedEvents in Drupal 8
Same name and namespace in other branches
- 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() {
// 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;
}