You are here

public function NameWidget::settingsSummary in Name Field 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/NameWidget.php, line 215

Class

NameWidget
Plugin implementation of the 'name' widget.

Namespace

Drupal\name\Plugin\Field\FieldWidget

Code

public function settingsSummary() {
  $summary = parent::settingsSummary();
  $widget_settings = $this
    ->getSettings();
  if (empty($widget_settings['override_field_settings'])) {
    array_unshift($summary, $this
      ->t('Using shared settings'));
  }
  else {
    array_unshift($summary, $this
      ->t('Overridden settings'));
  }
  return $summary;
}