You are here

function page_manager_context_cache_get in Chaos Tool Suite (ctools) 6

File

page_manager/page_manager.module, line 952
The page manager module provides a UI and API to manage pages.

Code

function page_manager_context_cache_get($task_name, $key) {
  $page = page_manager_get_page_cache($task_name);
  if ($page) {
    if (!empty($page->context_cache[$key])) {
      return $page->context_cache[$key];
    }
    else {
      ctools_include('context-task-handler');
      if ($key == 'temp') {
        $handler = $page->new_handler;
      }
      else {
        $handler = $page->handlers[$key];
      }
      return ctools_context_handler_get_task_object($page->task, $page->subtask, $handler);
    }
  }
}