function _ctools_context_select

Helper function for calling the required context object's selection function.

This function DOES NOT form part of the CTools API.

Parameters

array $contexts: A keyed array of all available contexts.

ctools_context_required $required: The required context object provided by the plugin.

$context: The selection made using ctools_context_selector().

Return value

ctools_context|bool FALSE if the $required is not an object. A ctools_context object if one matched.

1 call to _ctools_context_select()
ctools_context_select in includes/context.inc
Choose a context or contexts based upon the selection made via ctools_context_filter.

File

includes/context.inc, line 953

Code

function _ctools_context_select($contexts, $required, $context) {
    if (!is_object($required)) {
        return FALSE;
    }
    return $required->select($contexts, $context);
}