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

Respond to taxonomy vocabulary deletion.

This hook is invoked from taxonomy_vocabulary_delete() after field_attach_delete_bundle() has been called and after the vocabulary has been removed from the database.

Parameters

TaxonomyVocabulary $vocabulary: The taxonomy vocabulary that has been deleted.

See also

hook_taxonomy_vocabulary_predelete()

taxonomy_vocabulary_delete()

Related topics

File

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

Code

function hook_taxonomy_vocabulary_delete(TaxonomyVocabulary $vocabulary) {
  db_delete('mytable')
    ->condition('vocabulary', $vocabulary->machine_name)
    ->execute();
}