You are here

function taxtocomma_field_formatter_settings_summary in Taxonomy Formatter 7

Implements hook_field_formatter_settings_summary().

File

./taxonomy_formatter.module, line 98
adds a formatter for taxonomy terms with options to specify element type, wrapper type, and separators

Code

function taxtocomma_field_formatter_settings_summary($field, $instance, $view_mode) {
  $display = $instance['display'][$view_mode];
  $settings = $display['settings'];
  $summary = t('The Terms will be displayed separated by "') . $settings['separator_option'] . '"';
  if ($settings['links_option']) {
    $summary .= t('<br>The terms will link to the term pages');
  }
  if ($settings['element_option'] != "- None -") {
    $summary .= "<br>Elements will be wrapped in a " . $settings['element_option'] . " tag";
    if (!empty($settings['element_class'])) {
      $summary .= " with the class of " . $settings['element_class'];
    }
  }
  if ($settings['wrapper_option'] != "- None -") {
    $summary .= "<br>The entire list will be wrapped in a " . $settings['wrapper_option'] . " tag";
    if (!empty($settings['wrapper_class'])) {
      $summary .= " with the class of " . $settings['wrapper_class'];
    }
  }
  return $summary;
}