function photoswipe_field_formatter_view in PhotoSwipe 7.2
Same name and namespace in other branches
- 7 photoswipe.module \photoswipe_field_formatter_view()
Implements hook_field_formatter_view().
File
- ./
photoswipe.module, line 284 - Photswipe integration with Drupal module.
Code
function photoswipe_field_formatter_view($entity_type, $entity, $field, $instance, $langcode, $items, $display) {
$element = array();
if (!empty($items)) {
photoswipe_load_assets();
}
foreach ($items as $delta => $item) {
$element[$delta] = array(
'#theme' => 'photoswipe_image_formatter',
'#item' => $item,
'#node' => $entity,
'#field' => $field,
'#display_settings' => $display['settings'],
'#delta' => $delta,
);
}
return $element;
}