You are here

function jquery_carousel_field_formatter_view in jQuery carousel 7

Implements hook_field_formatter_view().

File

./jquery_carousel.module, line 145
Provide jquery carousel style plugin for views.

Code

function jquery_carousel_field_formatter_view($entity_type, $entity, $field, $instance, $langcode, $items, $display) {
  $element = array();
  if (!$items) {
    return $element;
  }

  // Initialize formatter settings.
  $settings = _jquery_carousel_formatter_defaults($display['settings']);

  // Theme the result.
  $element[] = array(
    '#markup' => theme('jquery_carousel_field_formatter', array(
      'element' => $items,
      'display' => $display,
      'settings' => $settings,
    )),
  );
  return $element;
}