function TaxonomyHooks::nodeUpdate

Implements hook_ENTITY_TYPE_update() for node entities.

File

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

Class

TaxonomyHooks
Hook implementations for taxonomy.

Namespace

Drupal\taxonomy\Hook

Code

public function nodeUpdate(EntityInterface $node) {
    // If we're not dealing with the default revision of the node, do not make any
    // change to the taxonomy index.
    if (!$node->isDefaultRevision()) {
        return;
    }
    taxonomy_delete_node_index($node);
    taxonomy_build_node_index($node);
}

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