You are here

function styles_field_formatter_info in Styles 6

Same name and namespace in other branches
  1. 6.2 styles.module \styles_field_formatter_info()
  2. 7.2 styles.module \styles_field_formatter_info()
  3. 7 styles.module \styles_field_formatter_info()

Implements CCK's hook_field_formatter_info().

File

./styles.module, line 14
Bundles similar display formatters together.

Code

function styles_field_formatter_info() {
  $info = array();
  $presets = styles_presets();
  foreach ($presets as $field_type => $styles) {
    foreach ($styles as $style_name => $style) {
      $info['styles_' . $field_type . '_' . $style_name] = array(
        'label' => t('@field Style: @style', array(
          '@field' => ucfirst($field_type),
          '@style' => $style_name,
        )),
        'field types' => array(
          $field_type,
        ),
      );
    }
  }
  return $info;
}