1 layout.module layout_create_renderer($renderer_plugin_name, Layout $layout)

Helper function to create a Layout Renderer.

Return value

LayoutRendererStandard|LayoutRendererEditor:

File

core/modules/layout/layout.module, line 1650
The Layout module creates pages and wraps existing pages in layouts.

Code

function layout_create_renderer($renderer_plugin_name, Layout $layout) {
  // Renderers do not have "broken" classes if they do not exist. As renderers
  // are not part of configuration, they should never go missing.
  $renderer_info = layout_get_renderer_info($renderer_plugin_name);
  return new $renderer_info['class']($layout, $renderer_info);
}