public function BarcodeFormatterBase::settingsSummary in Barcode 8
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/ BarcodeFormatterBase.php, line 52
Class
- BarcodeFormatterBase
- Base for barcode formatters.
Namespace
Drupal\barcode\Plugin\Field\FieldFormatterCode
public function settingsSummary() {
$settings = $this
->getSettings();
if ($settings['background']) {
$summary[] = $this
->t('Custom background color: @background', [
'@background' => $settings['background'],
]);
}
if ($settings['foreground']) {
$summary[] = $this
->t('Custom Foreground color: @foreground', [
'@foreground' => $settings['foreground'],
]);
}
return $summary;
}