function HtmlResponseSubscriber::onRespond
Same name in other branches
- 9 core/lib/Drupal/Core/EventSubscriber/HtmlResponseSubscriber.php \Drupal\Core\EventSubscriber\HtmlResponseSubscriber::onRespond()
- 10 core/lib/Drupal/Core/EventSubscriber/HtmlResponseSubscriber.php \Drupal\Core\EventSubscriber\HtmlResponseSubscriber::onRespond()
- 11.x core/lib/Drupal/Core/EventSubscriber/HtmlResponseSubscriber.php \Drupal\Core\EventSubscriber\HtmlResponseSubscriber::onRespond()
Processes attachments for HtmlResponse responses.
Parameters
\Symfony\Component\HttpKernel\Event\FilterResponseEvent $event: The event to process.
File
-
core/
lib/ Drupal/ Core/ EventSubscriber/ HtmlResponseSubscriber.php, line 39
Class
- HtmlResponseSubscriber
- Response subscriber to handle HTML responses.
Namespace
Drupal\Core\EventSubscriberCode
public function onRespond(FilterResponseEvent $event) {
$response = $event->getResponse();
if (!$response instanceof HtmlResponse) {
return;
}
$event->setResponse($this->htmlResponseAttachmentsProcessor
->processAttachments($response));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.