protected EntityStorageBase::mapFromStorageRecords(array $records)
Maps from storage records to entity objects.
Parameters
array $records: Associative array of query results, keyed on the entity ID.
Return value
\Drupal\Core\Entity\EntityInterface[] An array of entity objects implementing the EntityInterface.
File
- core/lib/Drupal/Core/Entity/EntityStorageBase.php, line 319
Class
- EntityStorageBase
- A base entity storage class.
Namespace
Drupal\Core\Entity
Code
protected function mapFromStorageRecords(array $records) {
$entities = array();
foreach ($records as $record) {
$entity = new $this->entityClass($record, $this->entityTypeId);
$entities[$entity->id()] = $entity;
}
return $entities;
}
Please login to continue.