function colorbox_field_formatter_view in Colorbox 7.2
Same name and namespace in other branches
- 7 colorbox.module \colorbox_field_formatter_view()
Implements hook_field_formatter_view().
File
- ./
colorbox.module, line 484 - 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();
$index = $display['settings']['colorbox_multivalue_index'];
foreach ($items as $delta => $item) {
if ($index === NULL || $index === $delta) {
$element[$delta] = array(
'#theme' => 'colorbox_image_formatter',
'#item' => $item,
'#entity_type' => $entity_type,
'#entity' => $entity,
// Left for legacy support.
'#node' => $entity,
'#field' => $field,
'#display_settings' => $display['settings'],
'#delta' => $delta,
);
}
}
return $element;
}