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

Breadcrumb

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

function HtmlResponseBigPipeSubscriber::getSubscribedEvents

Overrides EventSubscriberInterface::getSubscribedEvents

File

core/modules/big_pipe/src/EventSubscriber/HtmlResponseBigPipeSubscriber.php, line 116

Class

HtmlResponseBigPipeSubscriber
Response subscriber to replace the HtmlResponse with a BigPipeResponse.

Namespace

Drupal\big_pipe\EventSubscriber

Code

public static function getSubscribedEvents() : array {
    // Run after HtmlResponsePlaceholderStrategySubscriber (priority 5), i.e.
    // after BigPipeStrategy has been applied, but before normal (priority 0)
    // response subscribers have been applied, because by then it'll be too late
    // to transform it into a BigPipeResponse.
    $events[KernelEvents::RESPONSE][] = [
        'onRespondEarly',
        3,
    ];
    // Run as the last possible subscriber.
    $events[KernelEvents::RESPONSE][] = [
        'onRespond',
        -10000,
    ];
    return $events;
}

API Navigation

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