function hook_vocab_get_root_terms

3.x tripal.terms.api.inc hook_vocab_get_root_terms($vocabulary)

Hook used by the default term storage backend to provide root terms.

This hook is called by the tripal_entity module to retrieve a list of root terms for a given vocabulary from the storage backend. It must return an array of terms where each term contains the same structure as that of the hook_vocab_get_term().

Parameters

$vocabulary: The vocabulary of the vocabulary in which the term is found.

Return value

An array of root terms where each term contains the same structure as that of the hook_vocab_get_term(), or an empty array if no children are present.

Related topics

1 function implements hook_vocab_get_root_terms()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

tripal_chado_vocab_get_root_terms in tripal_chado/includes/tripal_chado.vocab_storage.inc
Implements hook_vocab_get_root_terms().

File

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

Code

function hook_vocab_get_root_terms($vocabulary) {
  // See the tripal_chado_vocab_get_root_terms() function for an example.
}