Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. AnonymousUserResponseSubscriber.php

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\EventSubscriber

Code

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

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal