function imagezoom_field_formatter_settings_form in Image Zoom 7
Same name and namespace in other branches
- 7.2 imagezoom.module \imagezoom_field_formatter_settings_form()
Implements hook_field_formatter_settings_form().
File
- ./
imagezoom.module, line 51 - Provides an Image Zoom field formatter for Image fields.
Code
function imagezoom_field_formatter_settings_form($field, $instance, $view_mode, $form, &$form_state) {
$display = $instance['display'][$view_mode];
$settings = $display['settings'];
$image_styles = image_style_options(FALSE);
$element['imagezoom_display_style'] = array(
'#type' => 'select',
'#title' => t('Display image style'),
'#options' => $image_styles,
'#empty_option' => t('None (original image)'),
'#default_value' => $settings['imagezoom_display_style'],
);
$element['imagezoom_zoom_style'] = array(
'#type' => 'select',
'#title' => t('Zoomed image style'),
'#options' => $image_styles,
'#empty_option' => t('None (original image)'),
'#default_value' => $settings['imagezoom_zoom_style'],
);
if (variable_get('imagezoom_multiple_thumbs', 0)) {
$element['imagezoom_thumb_style'] = array(
'#type' => 'select',
'#title' => t('Thumbnail image style'),
'#options' => $image_styles,
'#empty_option' => t('None (original image)'),
'#default_value' => $settings['imagezoom_thumb_style'],
);
}
return $element;
}