You are here

function panelizer_get_base_context in Panelizer 6

Same name and namespace in other branches
  1. 7 panelizer.module \panelizer_get_base_context()

Add the base context to the panelizer object.

For editing and displaying, we need the base context, which is the node the panel is attached to. During editing of defaults we don't know the node, though, so in that case we just provide the standard empty context.

3 calls to panelizer_get_base_context()
panelizer_context_cache_get in ./panelizer.module
Fetch the panelizer object from the object cache.
panelizer_default_context_form in includes/common.inc
Form to edit contexts that go with a panelizer panel.
panelizer_get_contexts in ./panelizer.module
Fetch an object array from panelizer information.

File

./panelizer.module, line 687
panelizer.module

Code

function panelizer_get_base_context($type, $object = NULL) {
  ctools_include($type, 'panelizer');
  $function = 'panelizer_get_base_context_' . $type;
  if (function_exists($function)) {
    return $function($object);
  }
}