Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. TaxonomyHooks.php

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);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal