You are here

function field_nif_field_load in Field NIF 7

Implements hook_field_load().

File

./field_nif.module, line 155

Code

function field_nif_field_load($entity_type, $entities, $field, $instances, $langcode, &$items, $age) {
  foreach ($entities as $id => $entity) {
    foreach ($items[$id] as $delta => $item) {

      // Load and display the correct information from the db.
      $items[$id][$delta]['nif'] = $item['first_letter'] . $item['number'] . $item['last_letter'];
    }
  }
}