function ds_field_formatter_info in Display Suite 7.2
Same name and namespace in other branches
- 7 ds.module \ds_field_formatter_info()
Implements hook_field_formatter_info().
File
- ./
ds.module, line 1172 - Display Suite core functions.
Code
function ds_field_formatter_info() {
$formatters = array();
if (module_exists('taxonomy')) {
$formatters['ds_taxonomy_view_mode'] = array(
'label' => t('Rendered taxonomy term'),
'description' => t('Display the referenced term in a specific view mode'),
'field types' => array(
'taxonomy_term_reference',
),
'settings' => array(
'taxonomy_term_reference_view_mode' => 'full',
'use_content_language' => TRUE,
),
);
$formatters['ds_taxonomy_separator'] = array(
'label' => t('Separated'),
'description' => t('Display the referenced term with a separator.'),
'field types' => array(
'taxonomy_term_reference',
),
'settings' => array(
'taxonomy_term_link' => TRUE,
'taxonomy_term_separator' => ', ',
),
);
if (module_exists('i18n_taxonomy')) {
$formatters['ds_taxonomy_separator_localized'] = array(
'label' => t('Separated (localized)'),
'description' => t('Display the referenced term with a separator. Use this with the "localize" translation mode for vocabularies.'),
'field types' => array(
'taxonomy_term_reference',
),
'settings' => array(
'taxonomy_term_link' => TRUE,
'taxonomy_term_separator' => ', ',
),
);
}
}
return $formatters;
}