function taxonomy_delete_node_index

Same name and namespace in other branches
  1. 11.x core/modules/taxonomy/taxonomy.module \taxonomy_delete_node_index()
  2. 10 core/modules/taxonomy/taxonomy.module \taxonomy_delete_node_index()
  3. 9 core/modules/taxonomy/taxonomy.module \taxonomy_delete_node_index()
  4. 8.9.x core/modules/taxonomy/taxonomy.module \taxonomy_delete_node_index()
  5. 7.x 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.

Deprecated

in drupal:11.4.0 and is removed from drupal:13.0.0. There is no replacement.

See also

https://www.drupal.org/node/3566774

File

core/modules/taxonomy/taxonomy.module, line 134

Code

function taxonomy_delete_node_index(EntityInterface $node) : void {
  @trigger_error(__FUNCTION__ . '() is deprecated in drupal:11.4.0 and is removed from drupal:13.0.0. There is no replacement. See https://www.drupal.org/node/3566774', E_USER_DEPRECATED);
  if (\Drupal::config('taxonomy.settings')->get('maintain_index_table')) {
    \Drupal::database()->delete('taxonomy_index')
      ->condition('nid', $node->id())
      ->execute();
  }
}

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