function ctools_terms_context

Discover if this argument gives us the term we crave.

1 string reference to 'ctools_terms_context'
terms.inc in plugins/arguments/terms.inc
Plugin to provide an argument handler for a Taxonomy term.

File

plugins/arguments/terms.inc, line 30

Code

function ctools_terms_context($arg = NULL, $conf = NULL, $empty = FALSE) {
    // If unset it wants a generic, unfilled context.
    if ($empty) {
        return ctools_context_create_empty('terms');
    }
    $terms = ctools_break_phrase($arg);
    if (empty($terms->value) || !empty($terms->invalid_input)) {
        return FALSE;
    }
    $context = ctools_context_create('terms', $terms);
    $context->original_argument = $arg;
    return $context;
}