You are here

function serial_field_formatter_view in Serial Field 7

Implements hook_field_formatter_view().

File

./serial.module, line 133
The Serial module main file.

Code

function serial_field_formatter_view($entity_type, $entity, array $field, array $instance, $langcode, array $items, array $display) {
  $element = array();

  // Define the field contents for the single default formatter.
  foreach ($items as $delta => $item) {
    $element[$delta] = array(
      '#markup' => theme('serial_formatter_default', array(
        'serial_id' => $item['value'],
      )),
    );
  }
  return $element;
}