function ctools_context_handler_summary

Get the array of summary strings for the arguments.

These summary strings are used to communicate to the user what arguments the task handlers are selecting.

Parameters

object $task: The loaded task plugin.

object $subtask: The subtask id.

object $handler: The handler to be checked.

Return value

array Returns array of summary strings for arguments selected by task handlers.

File

includes/context-task-handler.inc, line 311

Code

function ctools_context_handler_summary($task, $subtask, $handler) {
    if (empty($handler->conf['access']['plugins'])) {
        return array();
    }
    ctools_include('context');
    $strings = array();
    $contexts = ctools_context_handler_get_all_contexts($task, $subtask, $handler);
    foreach ($handler->conf['access']['plugins'] as $test) {
        $plugin = ctools_get_access_plugin($test['name']);
        if ($string = ctools_access_summary($plugin, $contexts, $test)) {
            $strings[] = $string;
        }
    }
    return $strings;
}