function _panels_everywhere_find_context in Panels Everywhere 6
Same name and namespace in other branches
- 7 plugins/tasks/site_template.inc \_panels_everywhere_find_context()
Search for the first context that matches our requirements.
If we can't find a context, produce an empty one instead.
1 call to _panels_everywhere_find_context()
- panels_everywhere_site_template_get_base_contexts in plugins/
tasks/ site_template.inc - Figure out the base contexts in use for the page.
File
- plugins/
tasks/ site_template.inc, line 187
Code
function _panels_everywhere_find_context($contexts, $type) {
$list = ctools_context_filter($contexts, new ctools_context_required('', $type));
if ($list) {
return drupal_clone(array_shift($list));
}
return ctools_context_create_empty($type);
}