You are here

function panels_renderer_ipe::prepare_panes in Panels 7.3

Prepare the list of panes to be rendered, accounting for visibility/access settings and rendering order.

This method represents the standard approach for determining the list of panes to be rendered that is compatible with all parts of the Panels architecture. It first applies visibility & access checks, then sorts panes into their proper rendering order, and returns the result as an array.

Inheriting classes should override this method if that renderer needs to regularly make additions to the set of panes that will be rendered.

Parameters

array $panes: An associative array of pane data (stdClass objects), keyed on pane id.

Return value

array An associative array of panes to be rendered, keyed on pane id and sorted into proper rendering order.

Overrides panels_renderer_standard::prepare_panes

File

panels_ipe/plugins/display_renderers/panels_renderer_ipe.class.php, line 189

Class

panels_renderer_ipe
Renderer class for all In-Place Editor (IPE) behavior.

Code

function prepare_panes($panes) {
  if (!$this
    ->access()) {
    return parent::prepare_panes($panes);
  }

  // Set to admin mode just for this to ensure all panes are represented.
  $this->admin = TRUE;
  $panes = parent::prepare_panes($panes);
  $this->admin = FALSE;
}