function hook_taxonomy_vocabulary_delete

Respond to the deletion of taxonomy vocabularies.

Modules implementing this hook can respond to the deletion of taxonomy vocabularies from the database.

Parameters

$vocabulary: A taxonomy vocabulary object.

Related topics

1 function implements hook_taxonomy_vocabulary_delete()

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_delete in modules/simpletest/tests/entity_crud_hook_test.module
Implements hook_taxonomy_vocabulary_delete().
1 invocation of hook_taxonomy_vocabulary_delete()
taxonomy_vocabulary_delete in modules/taxonomy/taxonomy.module
Deletes a vocabulary.

File

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

Code

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

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