public function ExistingAutocompleteFieldWidget::settingsSummary in Existing Values Autocomplete Widget 8
Same name and namespace in other branches
- 2.x src/Plugin/Field/FieldWidget/ExistingAutocompleteFieldWidget.php \Drupal\existing_values_autocomplete_widget\Plugin\Field\FieldWidget\ExistingAutocompleteFieldWidget::settingsSummary()
Returns a short summary for the current widget settings.
If an empty result is returned, a UI can still be provided to display a settings form in case the widget has configurable settings.
Return value
array A short summary of the widget settings.
Overrides WidgetBase::settingsSummary
File
- src/
Plugin/ Field/ FieldWidget/ ExistingAutocompleteFieldWidget.php, line 65
Class
- ExistingAutocompleteFieldWidget
- Plugin implementation of the 'existing_autocomplete_field_widget' widget.
Namespace
Drupal\existing_values_autocomplete_widget\Plugin\Field\FieldWidgetCode
public function settingsSummary() {
$summary = [];
$summary[] = t('Textfield size: @size', [
'@size' => $this
->getSetting('size'),
]);
if (!empty($this
->getSetting('placeholder'))) {
$summary[] = t('Placeholder: @placeholder', [
'@placeholder' => $this
->getSetting('placeholder'),
]);
}
return $summary;
}