1 layout_renderer_standard.inc | LayoutRendererStandard::addMeta() |
Attach out-of-band page metadata (e.g., CSS and JS).
This must be done before render, because layouts-within-layouts must have their CSS added in the right order: inner content before outer content.
File
- core/
modules/ layout/ plugins/ renderers/ layout_renderer_standard.inc, line 414
Class
- LayoutRendererStandard
- The standard render for a Layout display object.
Code
function addMeta() {
if (!empty($this->layout_template_info['stylesheets'])) {
foreach ($this->layout_template_info['stylesheets'] as $media => $file_names) {
foreach ($file_names as $file_name) {
$this->addCss($this->layout_template_info['path'] . '/' . $file_name, array('media' => $media));
}
}
}
if (!empty($this->layout_template_info['libraries'])) {
foreach ($this->layout_template_info['libraries'] as $library) {
$this->addLibrary('layout', $library);
}
}
}