You are here

function _field_timer_county_summary in Field Timer 7

Help function.

Build summary for field_timer_county formatter.

1 call to _field_timer_county_summary()
field_timer_field_formatter_settings_summary in ./field_timer.module
Implements hook_field_formatter_settings_summary().

File

includes/field_timer.inc, line 288
Contains some help functions for formatters and settings forms.

Code

function _field_timer_county_summary($settings) {
  $summary = array();
  $animations = array(
    'fade' => t('Fade'),
    'scroll' => t('Scroll'),
  );
  $summary[] = t('Animation: %animation', array(
    '%animation' => $animations[$settings['animation']],
  ));
  $summary[] = t('Speed: %speed', array(
    '%speed' => $settings['speed'] . 'ms',
  ));
  $themes = array(
    'black' => t('Black'),
    'gray' => t('Gray'),
    'red' => t('Red'),
    'blue' => t('Blue'),
  );
  $summary[] = t('Theme: %theme', array(
    '%theme' => $themes[$settings['county_theme']],
  ));
  $summary[] = t('Background: %css', array(
    '%css' => $settings['background'],
  ));
  $summary[] = t('Reflection: %state', array(
    '%state' => $settings['reflection'] ? 'Enabled' : 'Disabled',
  ));
  if ($settings['reflection']) {
    $summary[] = t('Reflection opacity: %opacity', array(
      '%opacity' => $settings['reflectionOpacity'],
    ));
  }
  return implode($summary, '<br />');
}