You are here

function ctools_context_handler_get_base_contexts in Chaos Tool Suite (ctools) 6

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

Get base contexts from a task, if it has any.

Tasks can get their contexts either from base contexts or arguments; base contexts extract their information from the environment.

2 calls to ctools_context_handler_get_base_contexts()
ctools_context_handler_get_task_contexts in includes/context-task-handler.inc
Load the contexts for a task, using arguments.
ctools_context_handler_get_task_object in includes/context-task-handler.inc
Create an object suitable for use with the context system that kind of expects things in a certain, kind of clunky format. This one adds in arguments from the task.

File

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

Code

function ctools_context_handler_get_base_contexts($task, $subtask, $placeholders = FALSE) {
  if ($function = ctools_plugin_get_function($task, 'get base contexts')) {
    return $function($task, $subtask, $placeholders);
  }
  return array();
}