public function EntityOperations::entityInsert in Drupal 9
Same name in this branch
- 9 core/modules/content_moderation/src/EntityOperations.php \Drupal\content_moderation\EntityOperations::entityInsert()
- 9 core/modules/workspaces/src/EntityOperations.php \Drupal\workspaces\EntityOperations::entityInsert()
Same name and namespace in other branches
- 8 core/modules/content_moderation/src/EntityOperations.php \Drupal\content_moderation\EntityOperations::entityInsert()
Parameters
\Drupal\Core\Entity\EntityInterface $entity: The entity that was just saved.
See also
File
- core/
modules/ content_moderation/ src/ EntityOperations.php, line 135
Class
- EntityOperations
- Defines a class for reacting to entity events.
Namespace
Drupal\content_moderationCode
public function entityInsert(EntityInterface $entity) {
if ($this->moderationInfo
->isModeratedEntity($entity)) {
$this
->updateOrCreateFromEntity($entity);
}
}