function redhen_fields_field_load in RedHen CRM 7
Implements hook_field_load().
Where possible, generate the sanitized version of each field early so that it is cached in the field cache. This avoids looking up from the filter cache separately.
See also
File
- modules/
redhen_fields/ redhen_fields.module, line 390 - Defines email, phone and address field types for RedHen CRM.
Code
function redhen_fields_field_load($entity_type, $entities, $field, $instances, $langcode, &$items) {
foreach ($entities as $id => $entity) {
foreach ($items[$id] as $delta => $item) {
isset($field['settings']['labels'][$item['label_id']]) ? $items[$id][$delta]['label'] = $field['settings']['labels'][$item['label_id']] : '';
}
}
}