function tripal_get_vocabulary_terms

3.x tripal.terms.api.inc tripal_get_vocabulary_terms($vocabulary, $limit = 25, $element = 0)

Retrieves a paged list of terms from a vocabulary.

Parameters

$vocabulary: The short name of the vocabulary.

$limit: The number of results to return.

$element: The pager element. This is equivalent to the element from the pager_default_initialize() function of Drupal.

Related topics

1 call to tripal_get_vocabulary_terms()
tripal_vocabulary_lookup_vocab_page in tripal/includes/tripal.term_lookup.inc
Provides the content for a single controlled vocabulary.

File

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

Code

function tripal_get_vocabulary_terms($vocabulary, $limit = 25, $element = 0) {
  $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_terms';
    if (function_exists($function)) {
      return $function($vocabulary, $limit, $element);
    }
  }
}