You are here

function boolean_field_formatter_settings_summary in Boolean Field 7

Implements hook_field_formatter_settings_summary().

File

./boolean.module, line 219
Defines boolean field type.

Code

function boolean_field_formatter_settings_summary($field, $instance, $view_mode) {
  $display = $instance['display'][$view_mode];
  $settings = $display['settings'];
  $labels = $settings['labels'] ? 'labels' : 'delta';
  $unchecked = $settings['omit_unchecked'] ? ' only if checked' : '';
  $with = $settings['prefix_suffix'] ? 'with' : 'without';
  $summary = t('Display !labels !with prefix and suffix!unchecked.', array(
    '!labels' => $labels,
    '!unchecked' => $unchecked,
    '!with' => $with,
  ));
  return $summary;
}