function hook_taxonomy_vocabulary_update

Act on taxonomy vocabularies when updated.

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

Parameters

Drupal\taxonomy\Plugin\Core\Entity\Vocabulary $vocabulary: A taxonomy vocabulary entity.

Related topics

1 function implements hook_taxonomy_vocabulary_update()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

entity_crud_hook_test_taxonomy_vocabulary_update in drupal/core/modules/system/tests/modules/entity_crud_hook_test/entity_crud_hook_test.module
Implements hook_taxonomy_vocabulary_update().

File

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

Code

function hook_taxonomy_vocabulary_update(Drupal\taxonomy\Plugin\Core\Entity\Vocabulary $vocabulary) {
  db_insert('mytable')
    ->fields(array(
    'vid' => $vocabulary
      ->id(),
    'foo' => $vocabulary->foo,
  ))
    ->execute();
}