function ctools_context_handler_get_task_object
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.
5 calls to ctools_context_handler_get_task_object()
- ctools_context_handler_edit_context in includes/
context-task-handler.inc - Edit contexts that go with this panel.
- ctools_context_handler_get_all_contexts in includes/
context-task-handler.inc - Load the contexts for a task and task handler together.
- page_manager_cache_page_manager_context_cache_get in page_manager/
plugins/ cache/ page_manager_context.inc - page_manager_handler_rearrange in page_manager/
page_manager.admin.inc - Rearrange the order of variants.
- page_manager_http_response_admin_summary in page_manager/
plugins/ task_handlers/ http_response.inc
File
-
includes/
context-task-handler.inc, line 396
Code
function ctools_context_handler_get_task_object($task, $subtask, $handler) {
$object = new stdClass();
$object->name = !empty($handler->name) ? $handler->name : 'temp';
$object->base_contexts = ctools_context_handler_get_base_contexts($task, $subtask, TRUE);
$object->arguments = ctools_context_handler_get_task_arguments($task, $subtask);
$object->contexts = isset($handler->conf['contexts']) ? $handler->conf['contexts'] : array();
$object->relationships = isset($handler->conf['relationships']) ? $handler->conf['relationships'] : array();
return $object;
}