function hook_taxonomy_vocabulary_delete

Respond to taxonomy vocabulary deletion.

This hook is invoked after entity_bundle_delete() has been called and after the vocabulary has been removed.

Parameters

Drupal\taxonomy\Plugin\Core\Entity\Vocabulary $vocabulary: The taxonomy vocabulary entity that has been deleted.

See also

hook_taxonomy_vocabulary_predelete()

Related topics

1 function implements hook_taxonomy_vocabulary_delete()

File

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

Code

function hook_taxonomy_vocabulary_delete(Drupal\taxonomy\Plugin\Core\Entity\Vocabulary $vocabulary) {
  db_delete('mytable')
    ->condition('vid', $vocabulary
    ->id())
    ->execute();
}