Act on entities when loaded.
This is a generic load hook called for all entity types loaded via the entity API.
$entities: The entities keyed by entity ID.
$type: The type of entities being loaded (i.e. node, user, comment).
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
function hook_entity_load($entities, $type) {
foreach ($entities as $entity) {
$entity->foo = mymodule_add_something($entity, $type);
}
}