You are here

function field_nif_field_formatter_view in Field NIF 7

Implements hook_field_formatter_view().

File

./field_nif.module, line 132

Code

function field_nif_field_formatter_view($entity_type, $entity, $field, $instance, $langcode, $items, $display) {
  $element = array();
  foreach ($items as $delta => $item) {
    if ($display['type'] == 'nif_default') {
      $element[$delta] = array(
        '#markup' => check_plain($item['nif']),
      );
    }
  }
  return $element;
}