1 taxonomy.api.php hook_taxonomy_vocabulary_update(TaxonomyVocabulary $vocabulary)

Act on taxonomy vocabularies when updated.

Modules implementing this hook can act on the vocabulary object when updated.

Parameters

TaxonomyVocabulary $vocabulary: A taxonomy vocabulary.

Related topics

File

core/modules/taxonomy/taxonomy.api.php, line 72
Hooks provided by the Taxonomy module.

Code

function hook_taxonomy_vocabulary_update(TaxonomyVocabulary $vocabulary) {
  db_update('mytable')
    ->fields(array('foo' => $vocabulary->foo))
    ->condition('vocabulary', $vocabulary->machine_name)
    ->execute();
}