function HtmlResponseSubscriber::onRespond
Processes attachments for HtmlResponse responses.
Parameters
\Symfony\Component\HttpKernel\Event\ResponseEvent $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(ResponseEvent $event) {
$response = $event->getResponse();
if (!$response instanceof HtmlResponse) {
return;
}
$event->setResponse($this->htmlResponseAttachmentsProcessor
->processAttachments($response));
}