function openlayers_cck_field_formatter_info in Openlayers 6.2
Same name and namespace in other branches
- 6 modules/openlayers_cck/openlayers_cck.module \openlayers_cck_field_formatter_info()
Implementation of hook_field_formatter_info().
File
- modules/
openlayers_cck/ openlayers_cck.module, line 433 - This file holds the main Drupal hook functions and private functions for the openlayers_cck module.
Code
function openlayers_cck_field_formatter_info() {
$formatters = array();
// Default formatter
$formatters['default'] = array(
'label' => t('Default Map'),
'field types' => array(
'openlayers_wkt',
),
'multiple values' => CONTENT_HANDLE_MODULE,
);
// WKT value
$formatters['openlayers_wkt'] = array(
'label' => t('WKT Value'),
'field types' => array(
'openlayers_wkt',
),
'multiple values' => CONTENT_HANDLE_MODULE,
);
// Map preset formatter
foreach (openlayers_preset_options() as $name => $title) {
$formatters['openlayers_map_' . $name] = array(
'label' => t('OpenLayers Map: @preset', array(
'@preset' => check_plain($title),
)),
'field types' => array(
'openlayers_wkt',
),
'multiple values' => CONTENT_HANDLE_MODULE,
);
}
return $formatters;
}