hook_entity_storage_load(array $entities, $entity_type)
Act on content entities when loaded from the storage.
The results of this hook will be cached.
Parameters
\Drupal\Core\Entity\EntityInterface[] $entities: The entities keyed by entity ID.
string $entity_type: The type of entities being loaded (i.e. node, user, comment).
See also
Related topics
- Hooks
- Define functions that alter the behavior of Drupal core.
File
- core/lib/Drupal/Core/Entity/entity.api.php, line 870
- Hooks and documentation related to entities.
Code
function hook_entity_storage_load(array $entities, $entity_type) { foreach ($entities as $entity) { $entity->foo = mymodule_add_something_uncached($entity); } }
Please login to continue.