function imceimage_field_formatter_info in Imce CCK Image 6
Same name and namespace in other branches
- 6.2 imceimage.module \imceimage_field_formatter_info()
Declare information about a formatter.
Return value
An array keyed by formatter name. Each element of the array is an associative array with these keys and values:
- "label": The human-readable label for the formatter.
- "field types": An array of field type names that can be displayed using this formatter.
File
- ./
imceimage.module, line 128
Code
function imceimage_field_formatter_info() {
$formatters = array(
'default' => array(
'label' => 'Default',
'field types' => array(
'imceimage',
),
'multiple values' => CONTENT_HANDLE_CORE,
),
'with_caption' => array(
'label' => 'With caption',
'field types' => array(
'imceimage',
),
'multiple values' => CONTENT_HANDLE_CORE,
),
'link' => array(
'label' => 'Link',
'field types' => array(
'imceimage',
),
'multiple values' => CONTENT_HANDLE_CORE,
),
'url' => array(
'label' => 'URL',
'field types' => array(
'imceimage',
),
'multiple values' => CONTENT_HANDLE_CORE,
),
'thumb' => array(
'label' => 'Thumbnail',
'field types' => array(
'imceimage',
),
'multiple values' => CONTENT_HANDLE_CORE,
),
);
if (module_exists('imagecache')) {
foreach (imagecache_presets() as $preset) {
$formatters[$preset['presetname'] . '_default'] = array(
'label' => t('@preset image', array(
'@preset' => $preset['presetname'],
)),
'field types' => array(
'imceimage',
),
);
$formatters[$preset['presetname'] . '_linked'] = array(
'label' => t('@preset image linked to node', array(
'@preset' => $preset['presetname'],
)),
'field types' => array(
'imceimage',
),
);
$formatters[$preset['presetname'] . '_imagelink'] = array(
'label' => t('@preset image linked to image', array(
'@preset' => $preset['presetname'],
)),
'field types' => array(
'imceimage',
),
);
$formatters[$preset['presetname'] . '_path'] = array(
'label' => t('@preset file path', array(
'@preset' => $preset['presetname'],
)),
'field types' => array(
'imceimage',
),
);
$formatters[$preset['presetname'] . '_url'] = array(
'label' => t('@preset URL', array(
'@preset' => $preset['presetname'],
)),
'field types' => array(
'imceimage',
),
);
}
}
return $formatters;
}