function DateTimeCustomFormatter::settingsSummary
Same name in other branches
- 9 core/modules/datetime/src/Plugin/Field/FieldFormatter/DateTimeCustomFormatter.php \Drupal\datetime\Plugin\Field\FieldFormatter\DateTimeCustomFormatter::settingsSummary()
- 10 core/modules/datetime/src/Plugin/Field/FieldFormatter/DateTimeCustomFormatter.php \Drupal\datetime\Plugin\Field\FieldFormatter\DateTimeCustomFormatter::settingsSummary()
- 11.x core/modules/datetime/src/Plugin/Field/FieldFormatter/DateTimeCustomFormatter.php \Drupal\datetime\Plugin\Field\FieldFormatter\DateTimeCustomFormatter::settingsSummary()
Overrides DateTimeFormatterBase::settingsSummary
1 call to DateTimeCustomFormatter::settingsSummary()
- DateRangeCustomFormatter::settingsSummary in core/
modules/ datetime_range/ src/ Plugin/ Field/ FieldFormatter/ DateRangeCustomFormatter.php - Returns a short summary for the current formatter settings.
1 method overrides DateTimeCustomFormatter::settingsSummary()
- DateRangeCustomFormatter::settingsSummary in core/
modules/ datetime_range/ src/ Plugin/ Field/ FieldFormatter/ DateRangeCustomFormatter.php - Returns a short summary for the current formatter settings.
File
-
core/
modules/ datetime/ src/ Plugin/ Field/ FieldFormatter/ DateTimeCustomFormatter.php, line 81
Class
- DateTimeCustomFormatter
- Plugin implementation of the 'Custom' formatter for 'datetime' fields.
Namespace
Drupal\datetime\Plugin\Field\FieldFormatterCode
public function settingsSummary() {
$summary = parent::settingsSummary();
$date = new DrupalDateTime();
$this->setTimeZone($date);
$summary[] = $date->format($this->getSetting('date_format'), $this->getFormatSettings());
return $summary;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.