function taxonomy_taxonomy_term_delete
Same name in other branches
- 7.x modules/taxonomy/taxonomy.module \taxonomy_taxonomy_term_delete()
- 8.9.x core/modules/taxonomy/taxonomy.module \taxonomy_taxonomy_term_delete()
- 10 core/modules/taxonomy/taxonomy.module \taxonomy_taxonomy_term_delete()
Implements hook_ENTITY_TYPE_delete() for taxonomy_term entities.
Related topics
File
-
core/
modules/ taxonomy/ taxonomy.module, line 387
Code
function taxonomy_taxonomy_term_delete(Term $term) {
if (\Drupal::config('taxonomy.settings')->get('maintain_index_table')) {
// Clean up the {taxonomy_index} table when terms are deleted.
\Drupal::database()->delete('taxonomy_index')
->condition('tid', $term->id())
->execute();
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.