You are here

function field_hidden_field_formatter_settings_summary in Field Hidden 7

Displays button in Manage Display section.

Implements hook_field_formatter_settings_summary().

Parameters

array $field:

array $instance:

string $view_mode:

Return value

string

File

./field_hidden.module, line 713
Drupal Field Hidden module

Code

function field_hidden_field_formatter_settings_summary($field, $instance, $view_mode) {
  $display = $instance['display'][$view_mode];
  $settings = $display['settings'];
  $summary = array();
  switch ($display['type']) {
    case 'field_hidden_integer':
      $summary[] = number_format(1234.123456789, 0, '', $settings['thousand_separator']);
      if ($settings['prefix_suffix']) {
        $summary[] = t('Display with prefix and suffix.');
      }
      break;
    case 'field_hidden_decimal':
      $summary[] = number_format(1234.123456789, $settings['scale'], $settings['decimal_separator'], $settings['thousand_separator']);
      if ($settings['prefix_suffix']) {
        $summary[] = t('Display with prefix and suffix.');
      }
      break;
    default:

      // field_hidden_text_plain
      return '';
  }
  return implode('<br />', $summary);
}