You are here

function linkimagefield_field_formatter_info in Link Image Field 6

Same name and namespace in other branches
  1. 5 linkimagefield.module \linkimagefield_field_formatter_info()
  2. 7 linkimagefield.module \linkimagefield_field_formatter_info()

Implementation of hook_field_formatter_info

Return value

array

File

./linkimagefield.module, line 187
Defines a link image field type.

Code

function linkimagefield_field_formatter_info() {
  $imagecache_presets = module_invoke('imagecache', 'presets');
  $formatters['linkimage'] = array(
    'label' => t('Link Image'),
    'field types' => array(
      'image',
      'filefield',
    ),
    'description' => t('Displays image files as link to provided URL.'),
  );
  foreach ($imagecache_presets as $preset) {
    $formatters[$preset['presetname'] . '_linkimage'] = array(
      'label' => t('@preset Link Image', array(
        '@preset' => $preset['presetname'],
      )),
      'field types' => array(
        'image',
        'filefield',
      ),
    );
  }
  return $formatters;
}