public function DateTimeFormatterBase::settingsSummary in Drupal 10
Same name and namespace in other branches
- 8 core/modules/datetime/src/Plugin/Field/FieldFormatter/DateTimeFormatterBase.php \Drupal\datetime\Plugin\Field\FieldFormatter\DateTimeFormatterBase::settingsSummary()
- 9 core/modules/datetime/src/Plugin/Field/FieldFormatter/DateTimeFormatterBase.php \Drupal\datetime\Plugin\Field\FieldFormatter\DateTimeFormatterBase::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 FormatterBase::settingsSummary
3 methods override DateTimeFormatterBase::settingsSummary()
- DateRangePlainFormatter::settingsSummary in core/
modules/ datetime_range/ src/ Plugin/ Field/ FieldFormatter/ DateRangePlainFormatter.php - Returns a short summary for the current formatter settings.
- DateTimeCustomFormatter::settingsSummary in core/
modules/ datetime/ src/ Plugin/ Field/ FieldFormatter/ DateTimeCustomFormatter.php - Returns a short summary for the current formatter settings.
- DateTimeDefaultFormatter::settingsSummary in core/
modules/ datetime/ src/ Plugin/ Field/ FieldFormatter/ DateTimeDefaultFormatter.php - Returns a short summary for the current formatter settings.
File
- core/
modules/ datetime/ src/ Plugin/ Field/ FieldFormatter/ DateTimeFormatterBase.php, line 110
Class
- DateTimeFormatterBase
- Base class for 'DateTime Field formatter' plugin implementations.
Namespace
Drupal\datetime\Plugin\Field\FieldFormatterCode
public function settingsSummary() {
$summary = parent::settingsSummary();
if ($override = $this
->getSetting('timezone_override')) {
$summary[] = $this
->t('Time zone: @timezone', [
'@timezone' => $override,
]);
}
return $summary;
}