public static function HtmlResponseBigPipeSubscriber::getSubscribedEvents in Drupal 10
Same name and namespace in other branches
- 8 core/modules/big_pipe/src/EventSubscriber/HtmlResponseBigPipeSubscriber.php \Drupal\big_pipe\EventSubscriber\HtmlResponseBigPipeSubscriber::getSubscribedEvents()
- 9 core/modules/big_pipe/src/EventSubscriber/HtmlResponseBigPipeSubscriber.php \Drupal\big_pipe\EventSubscriber\HtmlResponseBigPipeSubscriber::getSubscribedEvents()
File
- core/
modules/ big_pipe/ src/ EventSubscriber/ HtmlResponseBigPipeSubscriber.php, line 115
Class
- HtmlResponseBigPipeSubscriber
- Response subscriber to replace the HtmlResponse with a BigPipeResponse.
Namespace
Drupal\big_pipe\EventSubscriberCode
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;
}