field_attach_load

Loads all fields for each entity object in a group of a single entity type.
The loaded field values are added directly to the entity objects.

field_attach_load() is automatically called by the default entity controller
class, and thus, in most cases, doesn't need to be explicitly called by the
entity type module.

Parameters

$entity_type
The type of $entity; e.g., 'node' or 'user'.

$entities
An array of entities for which to load fields, keyed by entity ID.
Each entity needs to have its 'bundle', 'id' and (if applicable)
'revision' keys filled in. The function adds the loaded field data
directly in the entity objects of the $entities array.

$options
An associative array of additional options, with the following keys:

'field_id': The field ID that should be loaded, instead of
loading all fields, for each entity. Note that returned entities
may contain data for other fields, for example if they are read
from a cache.

'deleted': If TRUE, the function will operate on deleted fields
as well as non-deleted fields. If unset or FALSE, only
non-deleted fields are operated on.

Attaches data to entities upon loading.
This will attach fields, if the entity is fieldable. It calls
hook_entity_load() for modules which need to add data to all entities.
It also calls hook_TYPE_load() on the loaded entities. For…