function hook_vocab_get_vocabulary

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

Hook used by the default term storage backend to provide details for a vocab.

This hook is called by the tripal_entity module to retrieve information about the vocabulary from the storage backend. It must return an array with a set of keys.

Parameters

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

Return value

An array with at least the following keys:

  • name : The full name of the vocabulary.
  • short_name : The short name abbreviation for the vocabulary.
  • description : A brief description of the vocabulary.
  • url : (optional) A URL for the online resources for the vocabulary.
  • urlprefix : (optional) A URL to which the short_name and term accession can be appended to form a complete URL for a term. If the prefix does not support appending then the exact location for the position of the short_name and the term accession will be specified with the {db} and {accession} tags respectively.

Related topics

1 function implements hook_vocab_get_vocabulary()

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_vocabulary in tripal_chado/includes/tripal_chado.vocab_storage.inc
Implements hook_vocab_get_vocabulary().

File

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

Code

function hook_vocab_get_vocabulary($vocabulary) {
  // See the tripal_chado_vocab_get_vocabulary() function for an example.
}