You are here

function panels_renderer_standard::init in Panels 7.3

Same name and namespace in other branches
  1. 6.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.

File

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

Class

panels_renderer_standard

Code

function init($plugin, &$display) {
  $this->plugin = $plugin;
  $layout = panels_get_layout($display->layout);
  $this->display =& $display;
  $this->plugins['layout'] = $layout;
  if (!isset($layout['regions'])) {
    $this->plugins['layout']['regions'] = 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,
    ));
  }
}