You are here

function panels_renderer_standard::init 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::init()

Receive and store the display object to be rendered.

This is a psuedo-constructor that should typically be called immediately after object construction.

Parameters

array $plugin: The definition of the renderer plugin.

panels_display $display: The panels display object to be rendered.

1 method overrides panels_renderer_standard::init()
panels_renderer_single_pane::init in plugins/display_renderers/panels_renderer_single_pane.class.php
Modified build method (vs. panels_renderer_standard::build()); takes just the display, no layout is necessary.

File

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

Class

panels_renderer_standard
The standard render pipeline for a Panels display object.

Code

function init($plugin, &$display) {
  $this->plugin = $plugin;
  $layout = panels_get_layout($display->layout);
  $this->display =& $display;
  $this->plugins['layout'] = $layout;
  if (!isset($layout['panels'])) {
    $this->plugins['layout']['panels'] = panels_get_regions($layout, $display);
  }
  if (empty($this->plugins['layout'])) {
    watchdog('panels', "Layout: @layout couldn't been found, maybe the theme is disabled.", array(
      '@layout' => $display->layout,
    ));
  }
}