You are here

public static function AnonymousUserResponseSubscriber::getSubscribedEvents in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/EventSubscriber/AnonymousUserResponseSubscriber.php \Drupal\Core\EventSubscriber\AnonymousUserResponseSubscriber::getSubscribedEvents()

Registers the methods in this class that should be listeners.

Return value

array An array of event listener definitions.

Overrides EventSubscriberInterface::getSubscribedEvents

File

core/lib/Drupal/Core/EventSubscriber/AnonymousUserResponseSubscriber.php, line 79
Contains \Drupal\Core\EventSubscriber\AnonymousUserResponseSubscriber.

Class

AnonymousUserResponseSubscriber
Response subscriber to handle finished responses for the anonymous user.

Namespace

Drupal\Core\EventSubscriber

Code

public static function getSubscribedEvents() {

  // Priority 5, so that it runs before FinishResponseSubscriber, but after
  // event subscribers that add the associated cacheability metadata (which
  // have priority 10). This one is conditional, so must run after those.
  $events[KernelEvents::RESPONSE][] = [
    'onRespond',
    5,
  ];
  return $events;
}