You are here

function ctools_context_handler_get_all_contexts in Chaos Tool Suite (ctools) 7

Same name and namespace in other branches
  1. 6 includes/context-task-handler.inc \ctools_context_handler_get_all_contexts()

Load the contexts for a task and task handler together.

This pulls the arguments from a task and everything else from a task handler and loads them as a group. Since there is no data, this loads the contexts as placeholders.

3 calls to ctools_context_handler_get_all_contexts()
ctools_context_handler_edit_criteria in includes/context-task-handler.inc
Form to choose context based selection rules for a task handler.
ctools_context_handler_summary in includes/context-task-handler.inc
Get the array of summary strings for the arguments.
page_manager_task_handler_ctools_access_get in page_manager/page_manager.module
Callback for access control ajax form on behalf of context task handler.

File

includes/context-task-handler.inc, line 369
Support for creating 'context' type task handlers.

Code

function ctools_context_handler_get_all_contexts($task, $subtask, $handler) {
  $contexts = array();
  $object = ctools_context_handler_get_task_object($task, $subtask, $handler);
  $contexts = ctools_context_load_contexts($object, TRUE, $contexts);
  ctools_context_handler_set_access_restrictions($task, $subtask, $handler, $contexts);
  return $contexts;
}