1 EntityReferenceBehaviorHandlerTaxonomyIndex.inc public EntityReferenceBehaviorHandlerTaxonomyIndex::entityPostInsert($entity_type, $entity, $field, $instance)

Overrides EntityReferenceBehaviorHandler::entityPostInsert().

Runs after hook_node_insert() used by taxonomy module.

Overrides EntityReferenceBehaviorHandler::entityPostInsert

File

core/modules/entityreference/plugins/behavior/EntityReferenceBehaviorHandlerTaxonomyIndex.inc, line 42
Plugin class for the taxonomy behavior.

Class

EntityReferenceBehaviorHandlerTaxonomyIndex
Extends an entityreference field to maintain its references to taxonomy terms in the {taxonomy_index} table.

Code

public function entityPostInsert($entity_type, $entity, $field, $instance) {
  if ($entity_type != 'node') {
    return;
  }

  $this->buildNodeIndex($entity);
}