You are here

public function ContactAutocompleteWidget::settingsSummary in RedHen CRM 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

File

modules/redhen_contact/src/Plugin/Field/FieldWidget/ContactAutocompleteWidget.php, line 74

Class

ContactAutocompleteWidget
Plugin implementation of the 'redhen_contact_autocomplete' widget.

Namespace

Drupal\redhen_contact\Plugin\Field\FieldWidget

Code

public function settingsSummary() {
  $operators = $this
    ->getMatchOperatorOptions();
  $summary[] = $this
    ->t('Autocomplete matching: @match_operator', [
    '@match_operator' => $operators[$this
      ->getSetting('match_operator')],
  ]);
  $summary[] = $this
    ->t('Autocomplete suggestion list size: @size', [
    '@size' => $this
      ->getSetting('match_limit'),
  ]);
  $summary[] = $this
    ->t('Textfield size: @size', [
    '@size' => $this
      ->getSetting('size'),
  ]);
  $summary[] = $this
    ->t('Placeholder: @placeholder', [
    '@placeholder' => $this
      ->getSetting('placeholder'),
  ]);
  return $summary;
}