You are here

function cshs_field_formatter_settings_summary in Client-side Hierarchical Select 7

Implements hook_field_formatter_settings_summary().

File

./cshs.formatter.inc, line 84
All implementations of field formatters.

Code

function cshs_field_formatter_settings_summary($field, $instance, $view_mode) {
  $display = $instance['display'][$view_mode];
  $settings = $display['settings'];
  $summary = '';
  if ($display['module'] == 'cshs') {
    $summary .= t('Linked to term page: !linked', array(
      '!linked' => $settings['linked'] ? t('Yes') : t('No'),
    )) . '<br />';
  }
  if ($display['type'] == 'cshs_term_reference_hierarchical_text' || $display['type'] == 'cshs_term_reference_group_by_root') {
    $summary .= t('Separator: !separator', array(
      '!separator' => empty($settings['separator']) ? t('None') : $settings['separator'],
    )) . '<br />';
  }
  if ($display['type'] == 'cshs_term_reference_flexible_hierarchy') {
    $summary .= t('Format: !format', array(
      '!format' => $settings['format'],
    )) . '<br />';
  }
  return $summary;
}