function tripal_get_vocabularies

3.x tripal.terms.api.inc tripal_get_vocabularies()

Retrieves the list of vocabularies that are available on the site.

Return value

An array of vocabularies where each entry in the array is compatible with the array returned by the tripal_get_vocabulary_details() function.

Related topics

1 call to tripal_get_vocabularies()
tripal_vocabulary_lookup_page in tripal/includes/tripal.term_lookup.inc
Provides the content for the Controlled vocabulary home page.

File

tripal/api/tripal.terms.api.inc, line 539
Provides an application programming interface (API) for working with controlled vocaublary terms.

Code

function tripal_get_vocabularies() {
  $stores = module_invoke_all('vocab_storage_info');
  if (is_array($stores) and count($stores) > 0) {
    $keys = array_keys($stores);
    $module = $stores[$keys[0]]['module'];
    $function = $module . '_vocab_get_vocabularies';
    if (function_exists($function)) {
      return $function();
    }
  }
}