You are here

public function EntityReferenceLayoutWidget::settingsSummary in Entity Reference with Layout 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/EntityReferenceLayoutWidget.php, line 1321

Class

EntityReferenceLayoutWidget
Entity Reference with Layout field widget.

Namespace

Drupal\entity_reference_layout\Plugin\Field\FieldWidget

Code

public function settingsSummary() {
  $summary = parent::settingsSummary();
  $summary[] = $this
    ->t('Preview view mode: @preview_view_mode', [
    '@preview_view_mode' => $this
      ->getSetting('preview_view_mode'),
  ]);
  if ($this
    ->getSetting('always_show_options_form')) {
    $summary[] = $this
      ->t('Layout configuration: Show extra options form (deprecated).');
  }
  else {
    $summary[] = $this
      ->t('Layout configuration: Rely on Layout Plugins (preferred).');
  }
  return $summary;
}