protected EntityStorageBase::postLoad(array &$entities)
Attaches data to entities upon loading.
array $entities: Associative array of query results, keyed on the entity ID.
protected function postLoad(array &$entities) { $entity_class = $this->entityClass; $entity_class::postLoad($this, $entities); // Call hook_entity_load(). foreach ($this->moduleHandler()->getImplementations('entity_load') as $module) { $function = $module . '_entity_load'; $function($entities, $this->entityTypeId); } // Call hook_TYPE_load(). foreach ($this->moduleHandler()->getImplementations($this->entityTypeId . '_load') as $module) { $function = $module . '_' . $this->entityTypeId . '_load'; $function($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::postLoad/8.1.x