protected HtmlResponseAttachmentsProcessor::processHtmlHead(array $html_head)
Ensure proper key/data order and defaults for renderable head items.
array $html_head: The ['#attached']['html_head'] portion of a render array.
array The ['#attached']['html_head'] portion of a render array with #type of html_tag added for items without a #type.
protected function processHtmlHead(array $html_head) { $head = []; foreach ($html_head as $item) { list($data, $key) = $item; if (!isset($data['#type'])) { $data['#type'] = 'html_tag'; } $head[$key] = $data; } return $head; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Render!HtmlResponseAttachmentsProcessor.php/function/HtmlResponseAttachmentsProcessor::processHtmlHead/8.1.x