You are here

public function Select2Widget::settingsSummary in Select 2 8

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

1 call to Select2Widget::settingsSummary()
Select2EntityReferenceWidget::settingsSummary in src/Plugin/Field/FieldWidget/Select2EntityReferenceWidget.php
Returns a short summary for the current widget settings.
1 method overrides Select2Widget::settingsSummary()
Select2EntityReferenceWidget::settingsSummary in src/Plugin/Field/FieldWidget/Select2EntityReferenceWidget.php
Returns a short summary for the current widget settings.

File

src/Plugin/Field/FieldWidget/Select2Widget.php, line 53

Class

Select2Widget
Plugin implementation of the 'select2' widget.

Namespace

Drupal\select2\Plugin\Field\FieldWidget

Code

public function settingsSummary() {
  $summary = [];
  $summary[] = $this
    ->t('Field width: @width', [
    '@width' => $this
      ->getSetting('width'),
  ]);
  return $summary;
}