You are here

function ctools_context_handler_default_test in Chaos Tool Suite (ctools) 7

Default test function to see if a task handler should be rendered.

This tests against the standard selection criteria that most task handlers should be implementing.

1 call to ctools_context_handler_default_test()
ctools_context_handler_get_render_handler in includes/context-task-handler.inc
Figure out which of the listed handlers should be used to render.

File

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

Code

function ctools_context_handler_default_test($handler, $base_contexts, $args) {
  ctools_include('context');

  // Add my contexts.
  $contexts = ctools_context_handler_get_handler_contexts($base_contexts, $handler);

  // Test.
  return ctools_context_handler_select($handler, $contexts);
}