function ctools_context_term_convert in Chaos Tool Suite (ctools) 6
Same name and namespace in other branches
- 7 plugins/contexts/term.inc \ctools_context_term_convert()
Convert a context into a string.
1 string reference to 'ctools_context_term_convert'
File
- plugins/contexts/ term.inc, line 161 
- Plugin to provide a term context
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;
  }
}