HtmlResponseAttachmentsProcessor

Processes attachments of HTML responses.

This class is used by the rendering service to process the #attached part of the render array, for HTML responses.

To render attachments to HTML for testing without a controller, use the 'bare_html_page_renderer' service to generate a Drupal\Core\Render\HtmlResponse object. Then use its getContent(), getStatusCode(), and/or the headers property to access the result.

Hierarchy

See also

template_preprocess_html()

\Drupal\Core\Render\AttachmentsResponseProcessorInterface

\Drupal\Core\Render\BareHtmlPageRenderer

\Drupal\Core\Render\HtmlResponse

\Drupal\Core\Render\MainContent\HtmlRenderer

File

core/lib/Drupal/Core/Render/HtmlResponseAttachmentsProcessor.php, line 32

Namespace

Drupal\Core\Render

Members

Name Modifiers Type Description
HtmlResponseAttachmentsProcessor::$assetResolver protected property The asset resolver service.
HtmlResponseAttachmentsProcessor::$config protected property A config object for the system performance configuration.
HtmlResponseAttachmentsProcessor::$cssCollectionRenderer protected property The CSS asset collection renderer service.
HtmlResponseAttachmentsProcessor::$jsCollectionRenderer protected property The JS asset collection renderer service.
HtmlResponseAttachmentsProcessor::$moduleHandler protected property The module handler service.
HtmlResponseAttachmentsProcessor::$renderer protected property The renderer.
HtmlResponseAttachmentsProcessor::$requestStack protected property The request stack.
HtmlResponseAttachmentsProcessor::processAssetLibraries protected function Processes asset libraries into render arrays.
HtmlResponseAttachmentsProcessor::processAttachments public function Processes the attachments of a response that has attachments. Overrides AttachmentsResponseProcessorInterface::processAttachments
HtmlResponseAttachmentsProcessor::processFeed protected function Transform a 'feed' attachment into an 'html_head_link' attachment.
HtmlResponseAttachmentsProcessor::processHtmlHead protected function Ensure proper key/data order and defaults for renderable head items.
HtmlResponseAttachmentsProcessor::processHtmlHeadLink protected function Transform a html_head_link array into html_head and http_header arrays.
HtmlResponseAttachmentsProcessor::renderHtmlResponseAttachmentPlaceholders protected function Renders HTML response attachment placeholders.
HtmlResponseAttachmentsProcessor::renderPlaceholders protected function Renders placeholders (#attached['placeholders']).
HtmlResponseAttachmentsProcessor::setHeaders protected function Sets headers on a response object.
HtmlResponseAttachmentsProcessor::__construct public function Constructs a HtmlResponseAttachmentsProcessor object.
doc_Drupal
2016-10-29 09:18:51
Comments
Leave a Comment

Please login to continue.