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 64

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_info = $template_info;
  $this->flexible = TRUE;
}