function hook_vocab_get_term

3.x tripal.terms.api.inc hook_vocab_get_term($vocabulary, $accession)

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

This hook is called by the tripal_entity module to retrieve information about the term 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.

$accession: The unique identifier (accession) for this term.

Return value

An array with at least the following keys: -vocabulary : An associative array with the following keys: -name: The short name for the vocabulary (e.g. SO, PATO, etc). -description: The description of this vocabulary. -url: The URL 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. -accession : The name unique ID of the term. -url : The URL for the term. -name : The name of the term. -definition : The term's description. any other keys may be added as desired. Returns NULL if the term cannot be found.

Related topics

1 function implements hook_vocab_get_term()

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

File

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

Code

function hook_vocab_get_term($vocabulary, $accession) {
  // See the tripal_chado_vocab_get_term() function for an example.

}