function _content_taxonomy_get_all_terms in Content Taxonomy 6
Same name and namespace in other branches
- 6.2 content_taxonomy.module \_content_taxonomy_get_all_terms()
Helper functions that returns all terms group by their vocabulary
needed for some settings forms
3 calls to _content_taxonomy_get_all_terms()
- content_taxonomy_autocomplete_widget_settings in ./
content_taxonomy_autocomplete.module - Implementation of hook_widget_settings
- content_taxonomy_field_settings in ./
content_taxonomy.module - Implementation of hook_field_settings().
- content_taxonomy_options_widget_settings in ./
content_taxonomy_options.module - Implementation of hook_widget_settings
File
- ./
content_taxonomy.module, line 452 - Defines a field type for referencing a taxonomy term.
Code
function _content_taxonomy_get_all_terms() {
static $options = array();
if (!count($options)) {
$options[0] = '---';
foreach (taxonomy_get_vocabularies() as $voc) {
foreach (taxonomy_get_tree($voc->vid) as $term) {
_content_taxonomy_localize_term($term);
$options[$voc->name][$term->tid] = str_repeat('- ', $term->depth) . $term->name;
}
}
}
return $options;
}