function 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 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;
}