function imagecache_field_formatter_info in ImageCache 6.2
Same name and namespace in other branches
- 5.2 imagecache.module \imagecache_field_formatter_info()
- 5 imagecache.module \imagecache_field_formatter_info()
Implementation of hook_field_formatter_info().
imagecache formatters are named as $presetname_$style $style is used to determine how the preset should be rendered. If you are implementing custom imagecache formatters please treat _ as reserved.
@todo: move the linking functionality up to imagefield and clean up the default image integration.
File
- ./
imagecache.module, line 693 - Dynamic image resizer and image cacher.
Code
function imagecache_field_formatter_info() {
$formatters = array();
foreach (imagecache_presets() as $preset) {
$formatters[$preset['presetname'] . '_default'] = array(
'label' => t('@preset image', array(
'@preset' => $preset['presetname'],
)),
'field types' => array(
'image',
'filefield',
),
);
$formatters[$preset['presetname'] . '_linked'] = array(
'label' => t('@preset image linked to node', array(
'@preset' => $preset['presetname'],
)),
'field types' => array(
'image',
'filefield',
),
);
$formatters[$preset['presetname'] . '_imagelink'] = array(
'label' => t('@preset image linked to image', array(
'@preset' => $preset['presetname'],
)),
'field types' => array(
'image',
'filefield',
),
);
$formatters[$preset['presetname'] . '_path'] = array(
'label' => t('@preset file path', array(
'@preset' => $preset['presetname'],
)),
'field types' => array(
'image',
'filefield',
),
);
$formatters[$preset['presetname'] . '_url'] = array(
'label' => t('@preset URL', array(
'@preset' => $preset['presetname'],
)),
'field types' => array(
'image',
'filefield',
),
);
}
return $formatters;
}