You are here

public function SelectOrOtherWidgetBase::settingsSummary in Select (or other) 8.3

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/SelectOrOtherWidgetBase.php, line 110
Contains \Drupal\select_or_other\Plugin\Field\FieldWidget\SelectOrOtherWidgetBase.

Class

SelectOrOtherWidgetBase
Base class for the 'select_or_other_*' widgets.

Namespace

Drupal\select_or_other\Plugin\Field\FieldWidget

Code

public function settingsSummary() {
  $summary = parent::settingsSummary();
  $options = $this
    ->selectElementTypeOptions();
  $summary[] = $this
    ->t('Type of select form element') . ': ' . $options[$this
    ->getSetting('select_element_type')];
  return $summary;
}