function TaxonomyHooks::nodePredelete

Same name and namespace in other branches
  1. 11.x core/modules/taxonomy/src/Hook/TaxonomyHooks.php \Drupal\taxonomy\Hook\TaxonomyHooks::nodePredelete()

Implements hook_ENTITY_TYPE_predelete() for node entities.

Attributes

#[Hook('node_predelete')]

File

core/modules/taxonomy/src/Hook/TaxonomyHooks.php, line 160

Class

TaxonomyHooks
Hook implementations for taxonomy.

Namespace

Drupal\taxonomy\Hook

Code

public function nodePredelete(EntityInterface $node) : void {
  // Clean up the {taxonomy_index} table when nodes are deleted.
  $this->deleteNodeIndex($node);
}

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