function tripal_example_add_cvterms
2.x tripal_example.install | tripal_example_add_cvterms() |
Adds controlled vocabulary terms needed by this module.
1 call to tripal_example_add_cvterms()
- tripal_example_install in tripal_example/
tripal_example.install - Implements hook_install().
File
- tripal_example/
tripal_example.install, line 244 - Installation of the example module
Code
function tripal_example_add_cvterms() {
// EXPLANATION: for our test module to work we need to add some terms to our
// example_type controlled vocabulary. Ideally we should have a full OBO file
// for loading but sometimes we just have a small list that won't really
// change so we can add those terms here.
tripal_insert_cvterm(array(
'id' => 'test', // the term accession
'name' => 'Test type', // the human readable term name
'cv_name' => 'example_type', // the CV name this term belongs to.
'definition' => 'A test type for the example module.',
'db_name' => 'example_db', // the database in which the term is found.
));
}