Act before taxonomy term deletion.
This hook is invoked from taxonomy term deletion before field_attach_delete() is called and before the term is actually removed from the database.
Drupal\taxonomy\Term $term: The taxonomy term entity that is about to be deleted.
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_term_predelete(Drupal\taxonomy\Term $term) {
db_delete('mytable_index')
->condition('tid', $term
->id())
->execute();
}