hook_ENTITY_TYPE_load($entities)
Act on entities of a specific type when loaded.
array $entities: The entities keyed by entity ID.
function hook_ENTITY_TYPE_load($entities) { foreach ($entities as $entity) { $entity->foo = mymodule_add_something($entity); } }
© 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!entity.api.php/function/hook_ENTITY_TYPE_load/8.1.x