EntityOperations::entityInsert

public EntityOperations::entityInsert(EntityInterface $entity)

Hook bridge.

Parameters

\Drupal\Core\Entity\EntityInterface $entity: The entity that was just saved.

See also

hook_entity_insert()

File

core/modules/content_moderation/src/EntityOperations.php, line 114

Class

EntityOperations
Defines a class for reacting to entity events.

Namespace

Drupal\content_moderation

Code

public function entityInsert(EntityInterface $entity) {
  if ($this->moderationInfo->isModeratedEntity($entity)) {
    $this->updateOrCreateFromEntity($entity);
    $this->setLatestRevision($entity);
  }
}
doc_Drupal
2016-10-29 09:07:16
Comments
Leave a Comment

Please login to continue.