function picture_field_formatter_info in Picture 7.2
Same name and namespace in other branches
- 7 picture.module \picture_field_formatter_info()
Implements hook_field_formatter_info().
File
- ./
picture.module, line 388 - Picture formatter.
Code
function picture_field_formatter_info() {
$formatters = array();
$mappings = array_keys(picture_get_mapping_options());
if ($mappings) {
$formatters['picture'] = array(
'label' => t('Picture'),
'field types' => array(
'image',
),
'settings' => array(
'picture_mapping' => reset($mappings),
'fallback_image_style' => '',
'lazyload' => '',
'lazyload_aspect_ratio' => '',
'image_link' => '',
'colorbox_settings' => array(
'colorbox_group' => '',
'colorbox_gallery' => 'post',
'colorbox_gallery_custom' => '',
'colorbox_caption' => 'auto',
'colorbox_caption_custom' => '',
'colorbox_multivalue_index' => NULL,
),
),
);
}
$formatters['picture_sizes_formatter'] = array(
'label' => t('Image with sizes'),
'field types' => array(
'image',
),
'settings' => array(
'sizes' => '',
'image_styles' => array(),
'fallback_image_style' => PICTURE_EMPTY_IMAGE,
'lazyload' => '',
'lazyload_aspect_ratio' => '',
'lazyload_data_attributes' => 0,
'lazyload_class' => '',
'image_link' => '',
'colorbox_settings' => array(
'colorbox_group' => '',
'colorbox_gallery' => 'post',
'colorbox_gallery_custom' => '',
'colorbox_caption' => 'auto',
'colorbox_caption_custom' => '',
'colorbox_multivalue_index' => NULL,
),
),
);
return $formatters;
}