You are here

function blazy_field_formatter_view in Blazy 7

Implements hook_field_formatter_view().

File

./blazy.runtime.inc, line 107
Provides basic Blazy integration for lazy loading and multi-serving images.

Code

function blazy_field_formatter_view($entity_type, $entity, $field, $instance, $langcode, $items, $display) {
  $type = in_array($field['type'], BlazyDefault::TEXTS) ? 'text' : $field['type'];
  return blazy('plugin')
    ->getFormatter($type, $field, $instance)
    ->view($items, $langcode, $entity_type, $entity, $display);
}