public function MappedTermsTextfieldWidget::settingsSummary in Search API Field Map 8
Same name and namespace in other branches
- 8.3 src/Plugin/Field/FieldWidget/MappedTermsTextfieldWidget.php \Drupal\search_api_field_map\Plugin\Field\FieldWidget\MappedTermsTextfieldWidget::settingsSummary()
- 8.2 src/Plugin/Field/FieldWidget/MappedTermsTextfieldWidget.php \Drupal\search_api_field_map\Plugin\Field\FieldWidget\MappedTermsTextfieldWidget::settingsSummary()
- 4.x src/Plugin/Field/FieldWidget/MappedTermsTextfieldWidget.php \Drupal\search_api_field_map\Plugin\Field\FieldWidget\MappedTermsTextfieldWidget::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/ MappedTermsTextfieldWidget.php, line 55
Class
- MappedTermsTextfieldWidget
- Plugin implementation of the 'mapped_terms_textfield' widget.
Namespace
Drupal\search_api_field_map\Plugin\Field\FieldWidgetCode
public function settingsSummary() {
$summary = [];
$summary[] = t('Textfield size: @size', [
'@size' => $this
->getSetting('size'),
]);
$placeholder = $this
->getSetting('placeholder');
if (!empty($placeholder)) {
$summary[] = t('Placeholder: @placeholder', [
'@placeholder' => $placeholder,
]);
}
return $summary;
}