You are here

function oa_core_get_vocab_terms in Open Atrium Core 7.2

Return terms for a list of vocabularies

File

includes/oa_core.util.inc, line 1307
Code for Utility functions for OpenAtrium spaces

Code

function oa_core_get_vocab_terms($vocabs) {
  $options = array();
  foreach ($vocabs as $vocab) {
    if ($vocabulary = oa_core_taxonomy_vocabulary($vocab)) {
      if ($terms = taxonomy_get_tree($vocabulary->vid)) {
        foreach ($terms as $term) {
          $options[$term->tid] = str_repeat('-', $term->depth) . $term->name;
        }
      }
    }
  }
  return $options;
}