You are here

public function ZoneDefaultWidget::settingsSummary in Address 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/ZoneDefaultWidget.php, line 51

Class

ZoneDefaultWidget
Plugin implementation of the 'address_zone_default' widget.

Namespace

Drupal\address\Plugin\Field\FieldWidget

Code

public function settingsSummary() {
  $summary = [];
  $summary['show_label_field'] = $this
    ->t('Zone label field: @status', [
    '@status' => $this
      ->getSetting('show_label_field') ? $this
      ->t('Shown') : $this
      ->t('Hidden'),
  ]);
  return $summary;
}