function tripal_get_cvterm

2.x tripal_cv.api.inc tripal_get_cvterm($identifiers, $options = array())
3.x tripal_chado.module.DEPRECATED.api.inc tripal_get_cvterm($identifiers, $options = array())

Retrieves a chado controlled vocabulary term variable.

Parameters

$identifier: An array apropriate for use with the chado_generate_var for uniquely identifying a cvterm record. Alternativley, there are also some specially handled keys. They are:

  • id: an ID for the term of the for [dbname]:[accession], where [dbname] is the short name of the vocabulary and accession is the unique ID.
  • cv_id: an integer indicating the cv_id or an array with 'name' => the name of the cv.
  • synonym: an array with 'name' => the name of the synonym of the cvterm you want returned; 'cv_id' => the cv_id of the synonym; 'cv_name' => the name of the cv of the synonym.
  • property: An array/object describing the property to select records for. It should at least have either a type_name (if unique across cvs) or type_id. Other supported keys include: cv_id/cv_name (of the type), value and rank.

$options: An array of options. Supported keys include:

  • Any keys supported by chado_generate_var(). See that function definition for additional details.

NOTE: the $identifier parameter can really be any array similar to $values passed into chado_select_record(). It should fully specify the cvterm record to be returned.

Return value

If unique values were passed in as an identifier then an object describing the cvterm will be returned (will be a chado variable from chado_generate_var()). Otherwise, FALSE will be returned.

15 calls to tripal_get_cvterm()
chado_add_node_form_properties in legacy/tripal_core/api/tripal_core.chado_nodes.properties.api.inc
chado_contact_insert in legacy/tripal_contact/includes/tripal_contact.chado_node.inc
Implements of hook_insert().
chado_contact_update in legacy/tripal_contact/includes/tripal_contact.chado_node.inc
Implements hook_update
chado_feature_validate in legacy/tripal_feature/includes/tripal_feature.chado_node.inc
Implementation of hook_validate().
chado_library_insert in legacy/tripal_library/includes/tripal_library.chado_node.inc
Implements hook_insert().

... See full list

3 string references to 'tripal_get_cvterm'

File

tripal_chado/api/modules/tripal_chado.module.DEPRECATED.api.inc, line 184
These api functions are deprecated, if your site is currently using them please update your code with the newer tripal_chado functions.

Code

function tripal_get_cvterm($identifiers, $options = array()) {
  chado_get_cvterm($identifiers, $options);
}