function tripal_cv_get_cv_options
2.x tripal_cv.DEPRECATED.inc | tripal_cv_get_cv_options() |
3.x tripal_cv.DEPRECATED.inc | tripal_cv_get_cv_options() |
1.x tripal_cv.api.inc | tripal_cv_get_cv_options() |
Create an options array to be used in a form element which provides a list of all chado cvs
NOTE: This function is deprecated as of Tripal v1.0
Return value
An array(cv_id => name) for each cv in the chado cv table
Related topics
File
- tripal_cv/
api/ tripal_cv.api.inc, line 173 - Controlled Vocabulary API
Code
function tripal_cv_get_cv_options() {
$results = tripal_core_chado_select('cv', array('cv_id', 'name'), array());
$options = array();
foreach ($results as $r) {
$options[$r->cv_id] = $r->name;
}
return $options;
}