public function FieldWrapperBase::settingsSummary in (Entity Reference) Field Formatters 8.2
Same name and namespace in other branches
- 8 src/Plugin/Field/FieldFormatter/FieldWrapperBase.php \Drupal\field_formatter\Plugin\Field\FieldFormatter\FieldWrapperBase::settingsSummary()
- 3.x src/Plugin/Field/FieldFormatter/FieldWrapperBase.php \Drupal\field_formatter\Plugin\Field\FieldFormatter\FieldWrapperBase::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
File
- src/
Plugin/ Field/ FieldFormatter/ FieldWrapperBase.php, line 235
Class
- FieldWrapperBase
- Wraps an existing field.
Namespace
Drupal\field_formatter\Plugin\Field\FieldFormatterCode
public function settingsSummary() {
$summary = parent::settingsSummary();
if ($type = $this
->getSetting('type')) {
$summary[] = $this
->t('Formatter %type used.', [
'%type' => $type,
]);
}
else {
$summary[] = $this
->t('Formatter not configured.');
}
return $summary;
}