1 layout_renderer_flexible.inc | LayoutRendererFlexible::__construct(Layout $layout, array $renderer_plugin) |
Construct the object that will be used to render the editor.
Parameters
Layout $layout: The stub layout object required by the theme layer.
array $plugin: The definition of the renderer plugin.
File
- core/
modules/ layout/ plugins/ renderers/ layout_renderer_flexible.inc, line 77
Class
- LayoutRendererFlexible
- The renderer for the flexible template editor.
Code
function __construct(Layout $layout, array $renderer_plugin) {
$template_id = $layout->layout_template;
$template_info = layout_get_layout_template_info($template_id);
$template_data = layout_flexible_tempstore_load($template_id);
foreach ($template_data->rows as $position => $info) {
$layout->positions[$position] = array();
$template_info['regions'][$position] = $position;
}
$this->admin = TRUE;
$this->layout = &$layout;
$this->layout_template_info = $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;
}