You are here

function colorbox_field_formatter_view in Colorbox 7

Same name and namespace in other branches
  1. 7.2 colorbox.module \colorbox_field_formatter_view()

Implements hook_field_formatter_view().

File

./colorbox.module, line 596
A light-weight, customizable lightbox plugin for jQuery 1.3

Code

function colorbox_field_formatter_view($entity_type, $entity, $field, $instance, $langcode, $items, $display) {
  $element = array();
  foreach ($items as $delta => $item) {
    $element[$delta] = array(
      '#theme' => 'colorbox_image_formatter',
      '#item' => $item,
      '#entity_type' => $entity_type,
      '#entity' => $entity,
      '#node' => $entity,
      // Left for legacy support.
      '#field' => $field,
      '#display_settings' => $display['settings'],
    );
  }
  return $element;
}