You are here

function styles_field_formatter_info in Styles 6.2

Same name and namespace in other branches
  1. 6 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 21
styles.module Styles

Code

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