You are here

function _panels_everywhere_find_context in Panels Everywhere 7

Same name and namespace in other branches
  1. 6 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 163

Code

function _panels_everywhere_find_context($contexts, $type) {
  $list = ctools_context_filter($contexts, new ctools_context_required('', $type));
  if ($list) {
    return clone array_shift($list);
  }
  return ctools_context_create_empty($type);
}