You are here

public function field_timer_county_date_field_base::getSettingsSummary in Field Timer 7.2

@inheritdoc

Overrides field_timer_county_base::getSettingsSummary

File

includes/field_timer_county.inc, line 272
Help file. Contains help classes to perform field_timer_county formatter related actions.

Class

field_timer_county_date_field_base
Base class for field_timer_text formatter and date field types.

Code

public function getSettingsSummary($settings, $field) {
  $summary = array();
  if (!empty($field['settings']['todate'])) {
    $animations = $this
      ->formatterAnimations();
    $themes = $this
      ->formatterThemes();
    $displays = $this
      ->formatterDisplays();
    $summary[] = t('Title for Start date: %title', array(
      '%title' => $settings['title'],
    ));
    $summary[] = t('Animation for Start date: %animation', array(
      '%animation' => $animations[$settings['animation']],
    ));
    $summary[] = t('Speed for  Start date: %speed', array(
      '%speed' => $settings['speed'] . 'ms',
    ));
    $summary[] = t('Theme for Start date: %theme', array(
      '%theme' => $themes[$settings['county_theme']],
    ));
    $summary[] = t('Background for Start date: %css', array(
      '%css' => $settings['background'],
    ));
    $summary[] = t('Reflection for Start date: %state', array(
      '%state' => $settings['reflection'] ? 'Enabled' : 'Disabled',
    ));
    if ($settings['reflection']) {
      $summary[] = t('Reflection opacity for Start date: %opacity', array(
        '%opacity' => $settings['reflectionOpacity'],
      ));
    }
    $summary[] = t('Title for End date: %title', array(
      '%title' => $settings['title2'],
    ));
    $summary[] = t('Animation for End date: %animation', array(
      '%animation' => $animations[$settings['animation2']],
    ));
    $summary[] = t('Speed for  End date: %speed', array(
      '%speed' => $settings['speed2'] . 'ms',
    ));
    $summary[] = t('Theme for End date: %theme', array(
      '%theme' => $themes[$settings['county_theme2']],
    ));
    $summary[] = t('Background for End date: %css', array(
      '%css' => $settings['background2'],
    ));
    $summary[] = t('Reflection for End date: %state', array(
      '%state' => $settings['reflection2'] ? 'Enabled' : 'Disabled',
    ));
    if ($settings['reflection2']) {
      $summary[] = t('Reflection opacity for End date: %opacity', array(
        '%opacity' => $settings['reflectionOpacity2'],
      ));
    }
    $summary[] = t('Display: %display', array(
      '%display' => $displays[$settings['fromto']],
    ));
  }
  else {
    $summary[] = t('Title: %title', array(
      '%title' => $settings['title'],
    ));
    $summary = array_merge($summary, parent::getSettingsSummary($settings, $field));
  }
  return $summary;
}