You are here

function phonefield_field_formatter_view in Phone Field 7

Implements hook_field_formatter_view().

File

./phonefield.module, line 368
Hooks for a module that defines a simple phone number field type.

Code

function phonefield_field_formatter_view($entity_type, $entity, $field, $instance, $langcode, $items, $display) {
  $elements = array();
  foreach ($items as $delta => $item) {
    $elements[$delta] = array(
      '#theme' => 'phonefield_formatter_' . $display['type'],
      '#element' => $item,
      '#field' => $instance,
      '#display' => $display,
    );
  }
  return $elements;
}