function WorkspaceRequestSubscriber::getSubscribedEvents

Same name in other branches
  1. 9 core/modules/workspaces/src/EventSubscriber/WorkspaceRequestSubscriber.php \Drupal\workspaces\EventSubscriber\WorkspaceRequestSubscriber::getSubscribedEvents()
  2. 8.9.x core/modules/workspaces/src/EventSubscriber/WorkspaceRequestSubscriber.php \Drupal\workspaces\EventSubscriber\WorkspaceRequestSubscriber::getSubscribedEvents()
  3. 11.x core/modules/workspaces/src/EventSubscriber/WorkspaceRequestSubscriber.php \Drupal\workspaces\EventSubscriber\WorkspaceRequestSubscriber::getSubscribedEvents()

File

core/modules/workspaces/src/EventSubscriber/WorkspaceRequestSubscriber.php, line 39

Class

WorkspaceRequestSubscriber
Provides a event subscriber for setting workspace-specific cache keys.

Namespace

Drupal\workspaces\EventSubscriber

Code

public static function getSubscribedEvents() : array {
    // 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;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.