public function field_timer_text_date_field_base::getSettingsSummary in Field Timer 7.2
@inheritdoc
Overrides field_timer_text_base::getSettingsSummary
File
- includes/
field_timer_text.inc, line 291 - Contains help classes to perform field_timer_text formatter related actions.
Class
- field_timer_text_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'])) {
$types = $this
->formatterTypes();
$displays = $this
->formatterDisplays();
$granularity_options = $this
->granularitySettingsSummary($settings['granularity_type'], $settings['granularity_auto'], $settings['granularity_manual']);
$granularity_options2 = $this
->granularitySettingsSummary($settings['granularity_type2'], $settings['granularity_auto2'], $settings['granularity_manual2']);
$summary[] = t('Type for Start date: %type', array(
'%type' => $types[$settings['type']],
));
$summary[] = t('Granularity for Start date: %granularity_type (%granularity)', $granularity_options);
$summary[] = t('Title for Start date: %title', array(
'%title' => $settings['title'],
));
$summary[] = t('Type for End date: %type', array(
'%type' => $types[$settings['type2']],
));
$summary[] = t('Granularity for End date: %granularity_type (%granularity)', $granularity_options2);
$summary[] = t('Title for End date: %title', array(
'%title' => $settings['title2'],
));
$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;
}