public function Details::settingsSummary in Double Field 4.x
Same name and namespace in other branches
- 8.3 src/Plugin/Field/FieldFormatter/Details.php \Drupal\double_field\Plugin\Field\FieldFormatter\Details::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 Base::settingsSummary
File
- src/
Plugin/ Field/ FieldFormatter/ Details.php, line 48
Class
- Details
- Plugin implementations for 'details' formatter.
Namespace
Drupal\double_field\Plugin\Field\FieldFormatterCode
public function settingsSummary() : array {
$open = $this
->getSetting('open');
$summary[] = $this
->t('Open: @open', [
'@open' => $open ? $this
->t('yes') : $this
->t('no'),
]);
return array_merge($summary, parent::settingsSummary());
}