You are here

function shrinktheweb_field_formatter_view in ShrinkTheWeb 7

Implements hook_field_formatter_view().

File

./shrinktheweb.module, line 208

Code

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