taxonomy_taxonomy_term_delete

taxonomy_taxonomy_term_delete(Term $term)

Implements hook_ENTITY_TYPE_delete() for taxonomy_term entities.

Related topics

Taxonomy indexing
Functions to maintain taxonomy indexing.

File

core/modules/taxonomy/taxonomy.module, line 577
Enables the organization of content into categories.

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.
    db_delete('taxonomy_index')->condition('tid', $term->id())->execute();
  }
}
doc_Drupal
2016-10-29 09:46:32
Comments
Leave a Comment

Please login to continue.