function ctools_context_term_convert

Convert a context into a string.

1 string reference to 'ctools_context_term_convert'
term.inc in plugins/contexts/term.inc
Plugin to provide a term context.

File

plugins/contexts/term.inc, line 152

Code

function ctools_context_term_convert($context, $type) {
    switch ($type) {
        case 'tid':
            return $context->data->tid;
        case 'name':
            return $context->data->name;
        case 'name_dashed':
            return drupal_strtolower(str_replace(' ', '-', $context->data->name));
        case 'vid':
            return $context->data->vid;
        case 'description':
            return $context->data->description;
    }
}