->
range(0,
$step_size) ->
execute() ->
fetchCol();
/** @var \Drupal\Core\Entity\ContentEntityInterface[] $entities */
$entities =
$load_revisions ?
$this->storage->
loadMultipleRevisions($entity_identifiers) :
$this->storage->
loadMultiple($entity_identifiers);
/** @var \Drupal\Core\Entity\Sql\SqlContentEntityStorage $temporary_storage */
$temporary_storage =
$this->entityTypeManager->
createHandlerInstance($entity_type->
getStorageClass(),
$entity_type);
$temporary_storage->
setEntityType($entity_type);
$temporary_storage->
setFieldStorageDefinitions($field_storage_definitions);
$temporary_storage->
setTableMapping($sandbox['temporary_table_mapping'
]);
foreach ($entities as $identifier =>
$entity) { try { if (!
$original->
isRevisionable() &&
$entity_type->
isRevisionable()) { // Set the revision ID to be same as the entity ID.
$entity->
set($revision_id_key,
$entity->
id());
// We had no revisions so far, so the existing data belongs to the
// default revision now.
$entity->
set($revision_default_key, TRUE
);
}