function taxonomy_delete_node_index in Drupal 10
Same name and namespace in other branches
- 8 core/modules/taxonomy/taxonomy.module \taxonomy_delete_node_index()
- 7 modules/taxonomy/taxonomy.module \taxonomy_delete_node_index()
- 9 core/modules/taxonomy/taxonomy.module \taxonomy_delete_node_index()
Deletes taxonomy index entries for a given node.
Parameters
\Drupal\Core\Entity\EntityInterface $node: The node entity.
Related topics
2 calls to taxonomy_delete_node_index()
- taxonomy_node_predelete in core/
modules/ taxonomy/ taxonomy.module - Implements hook_ENTITY_TYPE_predelete() for node entities.
- taxonomy_node_update in core/
modules/ taxonomy/ taxonomy.module - Implements hook_ENTITY_TYPE_update() for node entities.
File
- core/
modules/ taxonomy/ taxonomy.module, line 243 - Enables the organization of content into categories.
Code
function taxonomy_delete_node_index(EntityInterface $node) {
if (\Drupal::config('taxonomy.settings')
->get('maintain_index_table')) {
\Drupal::database()
->delete('taxonomy_index')
->condition('nid', $node
->id())
->execute();
}
}