function AnonymousUserResponseSubscriber::getSubscribedEvents
Same name in other branches
- 9 core/lib/Drupal/Core/EventSubscriber/AnonymousUserResponseSubscriber.php \Drupal\Core\EventSubscriber\AnonymousUserResponseSubscriber::getSubscribedEvents()
- 8.9.x core/lib/Drupal/Core/EventSubscriber/AnonymousUserResponseSubscriber.php \Drupal\Core\EventSubscriber\AnonymousUserResponseSubscriber::getSubscribedEvents()
- 10 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.
File
-
core/
lib/ Drupal/ Core/ EventSubscriber/ AnonymousUserResponseSubscriber.php, line 74
Class
- AnonymousUserResponseSubscriber
- Response subscriber to handle finished responses for the anonymous user.
Namespace
Drupal\Core\EventSubscriberCode
public static function getSubscribedEvents() : array {
// 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;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.