function styled_google_map_field_formatter_view in Styled Google Map 7.2
Same name and namespace in other branches
- 7 styled_google_map.module \styled_google_map_field_formatter_view()
Implements hook_field_formatter_view().
File
- ./
styled_google_map.module, line 159 - Contains all hooks and functions for the Styled Google Map module.
Code
function styled_google_map_field_formatter_view($entity_type, $entity, $field, $instance, $langcode, $items, $display) {
$elements = array();
// Theme field element to a Styled Google Map with given theme variables.
if ($display['type'] == 'styled_google_map_map_formatter') {
foreach ($items as $item) {
$elements[] = array(
'#location' => $item,
'#display' => $display,
'#entity' => $entity,
'#entity_type' => $entity_type,
'#theme' => 'styled_google_map',
);
}
}
return $elements;
}