You are here

function _content_taxonomy_get_all_terms in Content Taxonomy 6

Same name and namespace in other branches
  1. 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


./content_taxonomy.module, line 452
Defines a field type for referencing a taxonomy term.


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) {
        $options[$voc->name][$term->tid] = str_repeat('- ', $term->depth) . $term->name;
  return $options;