function tripal_feature_del_vocabulary

1.x tripal_feature.module tripal_feature_del_vocabulary()

Related topics

1 call to tripal_feature_del_vocabulary()

File

tripal_feature/tripal_feature.module, line 2154
@todo Add file header description

Code

function tripal_feature_del_vocabulary() {
  //include the file containing the required functions for adding taxonomy vocabs
  module_load_include('inc', 'taxonomy', 'taxonomy.admin');

  // get the vocabularies
  $vocabularies = taxonomy_get_vocabularies();

  // These taxonomic terms are hard coded because we
  // know we have these relationships in the chado tables
  // through foreign key relationships.  The tripal
  // modules that correspond to these chado "modules" don't
  // need to be installed for the taxonomy to work.
  foreach ($vocabularies as $vocab) {
    if ($vocab->name == 'Feature Type') {
      taxonomy_del_vocabulary($vocab->vid);
    }
    if ($vocab->name == 'Organism') {
      taxonomy_del_vocabulary($vocab->vid);
    }
    if ($vocab->name == 'Library') {
      taxonomy_del_vocabulary($vocab->vid);
    }
    if ($vocab->name == 'Analysis') {
      taxonomy_del_vocabulary($vocab->vid);
    }
  }

}