You are here

function fft_field_formatter_settings_summary in Field Formatter Template 7

Implements hook_field_formatter_settings_summary().

File

./fft.module, line 230
Field formatter template.

Code

function fft_field_formatter_settings_summary($field, $instance, $view_mode) {
  $display = $instance['display'][$view_mode];
  $settings = $display['settings'];
  $summary = t('Formatter Template');
  if (isset($settings['template'])) {
    $fft_template = fft_get_templates();
    foreach ($fft_template['templates'] as $name => $title) {
      if ($settings['template'] == $name) {
        $summary = t('Formatter Template: @name', array(
          $title,
        ));
      }
    }
  }
  return $summary;
}