function panels_context_get_context in Panels 6.2
Same name and namespace in other branches
- 5.2 includes/plugins.inc \panels_context_get_context()
Get a context from a context object.
1 call to panels_context_get_context()
- panels_context_get_contexts in includes/
plugins.inc - Retrieve a list of empty contexts for all contexts
File
- includes/
plugins.inc, line 1144 - plugins.inc
Code
function panels_context_get_context($context, $type = 'context') {
if ($function = panels_plugin_get_function('contexts', $context['name'], 'context')) {
if (!isset($context['context_settings'])) {
$context['context_settings'] = array();
}
$return = $function($type == 'requiredcontext', $context['context_settings'], TRUE);
if ($return) {
$return->identifier = $context['identifier'];
$return->page_title = isset($context['title']) ? $context['title'] : '';
$return->keyword = $context['keyword'];
return $return;
}
}
}