You are here

public function SearchApiExcludeEntityFieldWidget::settingsSummary in Search API Exclude Entity 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

src/Plugin/Field/FieldWidget/SearchApiExcludeEntityFieldWidget.php, line 69

Class

SearchApiExcludeEntityFieldWidget
Advanced widget for search_api_exclude_entity field.

Namespace

Drupal\search_api_exclude_entity\Plugin\Field\FieldWidget

Code

public function settingsSummary() {
  $summary = [];
  $field_label = $this
    ->getSetting('field_label');
  if (!empty($field_label)) {
    $summary[] = $this
      ->t('Checkbox label: @field_label', [
      '@field_label' => $field_label,
    ]);
  }
  return $summary;
}