Act before taxonomy vocabulary deletion.
This hook is invoked before entity_bundle_delete() is called and before the vocabulary is actually removed.
Drupal\taxonomy\Plugin\Core\Entity\Vocabulary $vocabulary: The taxonomy vocabulary entity that is about to be deleted.
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.
function hook_taxonomy_vocabulary_predelete(Drupal\taxonomy\Plugin\Core\Entity\Vocabulary $vocabulary) {
db_delete('mytable_index')
->condition('vid', $vocabulary
->id())
->execute();
}