public function FieldTimerSimpleTextFormatter::settingsSummary in Field Timer 8
Same name and namespace in other branches
- 2.x src/Plugin/Field/FieldFormatter/FieldTimerSimpleTextFormatter.php \Drupal\field_timer\Plugin\Field\FieldFormatter\FieldTimerSimpleTextFormatter::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 TimestampAgoFormatter::settingsSummary
File
- src/
Plugin/ Field/ FieldFormatter/ FieldTimerSimpleTextFormatter.php, line 124
Class
- FieldTimerSimpleTextFormatter
- Plugin implementation of the 'field_timer_simple_text' formatter.
Namespace
Drupal\field_timer\Plugin\Field\FieldFormatterCode
public function settingsSummary() {
$summary = parent::settingsSummary();
$type = $this
->getSetting('type');
$summary[] = $this
->t('Type: @type', [
'@type' => $this
->typeOptions()[$type],
]);
return $summary;
}