protected EntityStorageBase::mapFromStorageRecords(array $records)
Maps from storage records to entity objects.
array $records: Associative array of query results, keyed on the entity ID.
\Drupal\Core\Entity\EntityInterface[] An array of entity objects implementing the EntityInterface.
protected function mapFromStorageRecords(array $records) { $entities = array(); foreach ($records as $record) { $entity = new $this->entityClass($record, $this->entityTypeId); $entities[$entity->id()] = $entity; } return $entities; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Entity!EntityStorageBase.php/function/EntityStorageBase::mapFromStorageRecords/8.1.x