You are here

function imagecache_field_formatter_info in ImageCache 5

Same name and namespace in other branches
  1. 5.2 imagecache.module \imagecache_field_formatter_info()
  2. 6.2 imagecache.module \imagecache_field_formatter_info()

Implementation of hook_field_formatter_info().

File

./imagecache.module, line 232
Dynamic image resizer and image cacher.

Code

function imagecache_field_formatter_info() {
  $rules = _imagecache_get_presets();
  foreach ($rules as $ruleid => $rulename) {
    $formatters[$rulename] = array(
      'label' => t('!rulename as image', array(
        '!rulename' => $rulename,
      )),
      'field types' => array(
        'image',
      ),
    );
    $formatters[$rulename . '_linked'] = array(
      'label' => t('!rulename as link', array(
        '!rulename' => $rulename,
      )),
      'field types' => array(
        'image',
      ),
    );
  }
  return $formatters;
}