1 layout_renderer_standard.inc LayoutRendererStandard::renderRegion($region_id, $blocks)

Render a single layout region.

Primarily just a passthrough to the layout region rendering callback specified by the style plugin that is attached to the current layout region.

Parameters

$region_id: The ID of the layout region being rendered.

$blocks: An array of blocks that are assigned to the region that's being rendered.

Return value

string: The rendered, HTML string output of the passed-in region.

File

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

Class

LayoutRendererStandard
The standard render for a Layout display object.

Code

function renderRegion($region_id, $blocks) {
  $style_settings = $this->prepared['regions'][$region_id]['style settings'];
  $tag = isset($style_settings['element']) ? $style_settings['element'] : '';
  $classes = array();
  if (isset($style_settings['classes'])) {
    $classes = explode(' ', $style_settings['classes']);
    foreach ($classes as $n => $class) {
      $classes[$n] = backdrop_clean_css_identifier($class, array());
    }
    $classes = array_filter($classes);
  }

  return theme('layout_region_inner', array('blocks' => $blocks, 'tag' => $tag, 'classes' => $classes));
}