public function SmartDateDurationFormatter::settingsSummary in Smart Date 3.0.x
Same name and namespace in other branches
- 8.2 src/Plugin/Field/FieldFormatter/SmartDateDurationFormatter.php \Drupal\smart_date\Plugin\Field\FieldFormatter\SmartDateDurationFormatter::settingsSummary()
- 3.x src/Plugin/Field/FieldFormatter/SmartDateDurationFormatter.php \Drupal\smart_date\Plugin\Field\FieldFormatter\SmartDateDurationFormatter::settingsSummary()
- 3.1.x src/Plugin/Field/FieldFormatter/SmartDateDurationFormatter.php \Drupal\smart_date\Plugin\Field\FieldFormatter\SmartDateDurationFormatter::settingsSummary()
- 3.2.x src/Plugin/Field/FieldFormatter/SmartDateDurationFormatter.php \Drupal\smart_date\Plugin\Field\FieldFormatter\SmartDateDurationFormatter::settingsSummary()
- 3.3.x src/Plugin/Field/FieldFormatter/SmartDateDurationFormatter.php \Drupal\smart_date\Plugin\Field\FieldFormatter\SmartDateDurationFormatter::settingsSummary()
- 3.4.x src/Plugin/Field/FieldFormatter/SmartDateDurationFormatter.php \Drupal\smart_date\Plugin\Field\FieldFormatter\SmartDateDurationFormatter::settingsSummary()
Returns a short summary for the current formatter settings.
If an empty result is returned, a UI can still be provided to display a settings form in case the formatter has configurable settings.
Return value
string[] A short summary of the formatter settings.
Overrides SmartDateDefaultFormatter::settingsSummary
File
- src/
Plugin/ Field/ FieldFormatter/ SmartDateDurationFormatter.php, line 60
Class
- SmartDateDurationFormatter
- Plugin implementation of a duration-based formatter for 'smartdate' fields.
Namespace
Drupal\smart_date\Plugin\Field\FieldFormatterCode
public function settingsSummary() {
$summary[] = $this
->getSetting('timezone_override') === '' ? t('No timezone override.') : t('Timezone overridden to %timezone.', [
'%timezone' => $this
->getSetting('timezone_override'),
]);
$summary[] = t('Smart date format: %format.', [
'%format' => $this
->getSetting('format'),
]);
$summary[] = t('Duration separator: %duration_separator.', [
'%duration_separator' => $this
->getSetting('duration_separator'),
]);
return $summary;
}