You are here

function ctools_context_handler_select in Chaos Tool Suite (ctools) 6

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

Compare arguments to contexts for selection purposes.

Parameters

$handler: The handler in question.

$contexts: The context objects provided by the task.

Return value

TRUE if these contexts match the selection rules. NULL or FALSE otherwise.

1 call to ctools_context_handler_select()
page_manager_http_response_render in page_manager/plugins/task_handlers/http_response.inc

File

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

Code

function ctools_context_handler_select($handler, $contexts) {
  if (empty($handler->conf['access'])) {
    return TRUE;
  }
  ctools_include('context');
  return ctools_access($handler->conf['access'], $contexts);
}