function EntityOperations::entityUpdate
Same name in this branch
- 11.1.x core/modules/content_moderation/src/EntityOperations.php \Drupal\content_moderation\EntityOperations::entityUpdate()
Responds to updates to an entity.
Parameters
\Drupal\Core\Entity\EntityInterface $entity: The entity that was just saved.
See also
File
-
core/
modules/ workspaces/ src/ EntityOperations.php, line 225
Class
- EntityOperations
- Defines a class for reacting to entity events.
Namespace
Drupal\workspacesCode
public function entityUpdate(EntityInterface $entity) {
if ($this->shouldSkipOperations($entity) || !$this->workspaceInfo
->isEntitySupported($entity)) {
return;
}
// Only track new revisions.
/** @var \Drupal\Core\Entity\RevisionableInterface $entity */
if ($entity->getLoadedRevisionId() != $entity->getRevisionId()) {
$this->workspaceAssociation
->trackEntity($entity, $this->workspaceManager
->getActiveWorkspace());
}
}