You are here

function panels_renderer_standard::render_region in Panels 6.3

Same name and namespace in other branches
  1. 7.3 plugins/display_renderers/panels_renderer_standard.class.php \panels_renderer_standard::render_region()

Render a single panel region.

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

Parameters

$region_id: The ID of the panel region being rendered

$panes: An array of panes that are assigned to the panel that's being rendered.

Return value

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

2 calls to panels_renderer_standard::render_region()
panels_renderer_editor::render_region in plugins/display_renderers/panels_renderer_editor.class.php
Render a single panel region.
panels_renderer_standard::render_regions in plugins/display_renderers/panels_renderer_standard.class.php
Render all prepared regions, placing already-rendered panes into their appropriate positions therein.
1 method overrides panels_renderer_standard::render_region()
panels_renderer_editor::render_region in plugins/display_renderers/panels_renderer_editor.class.php
Render a single panel region.

File

plugins/display_renderers/panels_renderer_standard.class.php, line 615

Class

panels_renderer_standard
The standard render pipeline for a Panels display object.

Code

function render_region($region_id, $panes) {
  $style = $this->prepared['regions'][$region_id]['style'];
  $style_settings = $this->prepared['regions'][$region_id]['style settings'];

  // Retrieve the pid (can be a panel page id, a mini panel id, etc.), this
  // might be used (or even necessary) for some panel display styles.
  // TODO: Got to fix this to use panel page name instead of pid, since pid is
  // no longer guaranteed. This needs an API to be able to set the final id.
  $owner_id = 0;
  if (isset($this->display->owner) && is_object($this->display->owner) && isset($this->display->owner->id)) {
    $owner_id = $this->display->owner->id;
  }
  return theme($style['render region'], $this->display, $owner_id, $panes, $style_settings, $region_id, $style);
}