function cloud_zoom_field_formatter_info in Cloud Zoom 8
Same name and namespace in other branches
- 6 cloud_zoom.module \cloud_zoom_field_formatter_info()
- 7 cloud_zoom.module \cloud_zoom_field_formatter_info()
Implements hook_field_formatter()
File
- ./
cloud_zoom.module, line 337 - This module integrates the Cloud Zoom JQuery library from: http://www.professorcloud.com/mainsite/cloud-zoom.htm
Code
function cloud_zoom_field_formatter_info() {
$formatters = array();
$cloud_zoom_settings = cloud_zoom_settings_info('default_value');
$default_settings = array();
// Return a single depth array with the given key as value.
foreach ($cloud_zoom_settings as $key => $setting) {
if (isset($setting['fieldset'])) {
$default_settings[$setting['fieldset']][$key] = $setting['default_value'];
}
else {
$default_settings[$key] = $setting['default_value'];
}
}
$formatters['cloud_zoom'] = array(
'label' => t('Cloud zoom'),
'field types' => array(
'image',
),
'settings' => $default_settings,
);
return $formatters;
}