try{ $transaction = $this->database->startTransaction(); // @todo Handle the publishing of a workspace with a batch operation in
// https://www.drupal.org/node/2958752.
$this->workspaceManager->executeOutsideWorkspace(function D)use($tracked_entities){ foreach($tracked_entitiesas$entity_type_id => $revision_difference){ $entity_revisions = $this->entityTypeManager->getStorage($entity_type_id) ->loadMultipleRevisions(array_keys($revision_difference));