// field, such as 'isDefaultRevision'.
foreach ($record as $name =>
$value) { $values[$id][$name][LanguageInterface::LANGCODE_DEFAULT
] =
$value;
} } // Initialize translations array.
$translations =
array_fill_keys(array_keys($values),
[]);
// Load values from shared and dedicated tables.
$this->
loadFromSharedTables($values,
$translations,
$load_from_revision);
$this->
loadFromDedicatedTables($values,
$load_from_revision);
$entities =
[];
foreach ($values as $id =>
$entity_values) { $bundle =
$this->bundleKey ?
$entity_values[$this->bundleKey
][LanguageInterface::LANGCODE_DEFAULT
] : NULL;
// Turn the record into an entity class.
$entity_class =
$this->
getEntityClass($bundle);
$entities[$id] =
new $entity_class($entity_values,
$this->entityTypeId,
$bundle,
array_keys($translations[$id]));
} return $entities;
}