You are here

function ds_field_formatter_info in Display Suite 7

Same name and namespace in other branches
  1. 7.2 ds.module \ds_field_formatter_info()

Implements hook_field_formatter_info().

File

./ds.module, line 1309
Display Suite core functions.

Code

function ds_field_formatter_info() {
  $formatters = array();

  // Add view modes of taxonomy to term formatters.
  if (module_exists('taxonomy')) {
    $view_modes = ds_entity_view_modes('taxonomy_term');
    foreach ($view_modes as $key => $view_mode) {
      $formatters['taxonomy_' . $key] = array(
        'label' => t('View mode: ' . $view_mode['label']),
        'field types' => array(
          'taxonomy_term_reference',
        ),
      );
    }
  }
  return $formatters;
}