1 link.module link_field_formatter_view($entity_type, $entity, $field, $instance, $langcode, $items, $display)

Implements hook_field_formatter_view().

File

core/modules/link/link.module, line 996
Defines simple link field types.

Code

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