public function HtmlResponseSubscriber::onRespond in Drupal 8
Same name and namespace in other branches
- 9 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));
}