You are here

public function EntityReferenceBehavior_TaxonomyIndex::entityPostInsert in Entity reference 7

Overrides EntityReference_BehaviorHandler_Abstract::entityPostInsert().

Runs after hook_node_insert() used by taxonomy module.

Overrides EntityReference_BehaviorHandler_Abstract::entityPostInsert

File

plugins/behavior/EntityReferenceBehavior_TaxonomyIndex.class.php, line 42
CTools plugin class for the taxonomy-index behavior.

Class

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