function hook_taxonomy_vocabulary_update

Act on taxonomy vocabularies when updated.

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

Parameters

$vocabulary: A taxonomy vocabulary object.

Related topics

3 functions implement hook_taxonomy_vocabulary_update()

Note: the procedural functions in this list are found by pattern matching, so the list may include some functions that are not actually implementations of this hook.

EntityCrudHookTestHooks::taxonomyVocabularyUpdate in core/modules/system/tests/modules/entity_crud_hook_test/src/Hook/EntityCrudHookTestHooks.php
Implements hook_ENTITY_TYPE_update() for taxonomy_vocabulary entities.
entity_crud_hook_test_taxonomy_vocabulary_update in modules/simpletest/tests/entity_crud_hook_test.module
Implements hook_taxonomy_vocabulary_update().
taxonomy_taxonomy_vocabulary_update in modules/taxonomy/taxonomy.module
Implements hook_taxonomy_vocabulary_update().
1 invocation of hook_taxonomy_vocabulary_update()
taxonomy_vocabulary_save in modules/taxonomy/taxonomy.module
Saves a vocabulary.

File

modules/taxonomy/taxonomy.api.php, line 68

Code

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

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.