You are here

public function PanelizerEntityDefault::get_contexts in Panelizer 7.3

Same name and namespace in other branches
  1. 7.2 plugins/entity/PanelizerEntityDefault.class.php \PanelizerEntityDefault::get_contexts()

Fetch an object array of CTools contexts from panelizer information.

Overrides PanelizerEntityInterface::get_contexts

3 calls to PanelizerEntityDefault::get_contexts()
PanelizerEntityDefault::access_default_panelizer_object in plugins/entity/PanelizerEntityDefault.class.php
Determine if the current user has access to the $panelizer.
PanelizerEntityDefault::page_layout in plugins/entity/PanelizerEntityDefault.class.php
PanelizerEntityDefault::render_entity in plugins/entity/PanelizerEntityDefault.class.php
Render the panels display for a given panelizer entity.

File

plugins/entity/PanelizerEntityDefault.class.php, line 3525
Base class for the Panelizer Entity plugin.

Class

PanelizerEntityDefault
Base class for the Panelizer Entity plugin.

Code

public function get_contexts($panelizer, $entity = NULL) {
  ctools_include('context');
  if (empty($panelizer->base_contexts)) {
    $panelizer->base_contexts = $this
      ->get_base_contexts($entity);
  }
  $contexts = ctools_context_load_contexts($panelizer);
  return $contexts;
}