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

LayoutMissingException

File

core/modules/layout/plugins/renderers/layout_renderer_standard.inc, line 147

Class

LayoutRendererStandard
The standard render for a Layout display object.

Code

function __construct(Layout $layout, array $renderer_plugin) {
  $this->plugin = $renderer_plugin;
  $layout_info = layout_get_layout_template_info($layout->layout_template);
  $this->layout = &$layout;

  if (empty($layout_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_info = $layout_info;
  }
}