function styles_field_formatter_info in Styles 7.2
Same name and namespace in other branches
- 6.2 styles.module \styles_field_formatter_info()
- 6 styles.module \styles_field_formatter_info()
- 7 styles.module \styles_field_formatter_info()
Implements hook_field_formatter_info().
File
- ./
styles.module, line 19 - Bundles similar display formatters together.
Code
function styles_field_formatter_info() {
$info = array();
foreach (styles_default_styles() as $field_type => $styles) {
foreach ($styles['styles'] as $style) {
$style_name = $style['name'];
$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,
),
'behaviors' => array(
'multiple values' => FIELD_BEHAVIOR_DEFAULT,
),
'theme' => array(
'function' => 'theme_styles_field_formatter',
),
);
}
}
return $info;
}