1 layout_renderer_standard.inc | LayoutRendererStandard::__construct(Layout $layout, array $renderer_plugin) |
Construct the object that will be used to render the layout.
Parameters
Layout $layout: The layout object to be rendered.
array $plugin: The definition of the renderer plugin.
Throws
File
- core/
modules/ layout/ plugins/ renderers/ layout_renderer_standard.inc, line 156
Class
- LayoutRendererStandard
- The standard render for a Layout display object.
Code
function __construct(Layout $layout, array $renderer_plugin) {
$this->plugin = $renderer_plugin;
$layout_template_info = layout_get_layout_template_info($layout->layout_template);
$this->layout = &$layout;
if (empty($layout_template_info)) {
throw new LayoutMissingException(t('The layout plugin "@plugin" could not been found to display the "@title" layout.', array('@plugin' => $layout->layout_template, '@title' => $layout->title)));
}
else {
$this->layout_template_info = $layout_template_info;
}
// Adjust for the renaming of "layout_info" to "layout_template_info".
// See https://github.com/backdrop/backdrop-issues/issues/6628.
// @todo: Remove in 2.x.
$this->layout_info = $this->layout_template_info;
}