You are here

public function AvatarGeneratorPreviewWidget::settingsSummary in Avatar Kit 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/AvatarGeneratorPreviewWidget.php, line 67

Class

AvatarGeneratorPreviewWidget
Widget for avatar generator selection fields.

Namespace

Drupal\avatars\Plugin\Field\FieldWidget

Code

public function settingsSummary() {
  $image_style = $this
    ->getPreviewImageStyle() ?: $this
    ->t('Original');
  return [
    t('Preview image style: @style', [
      '@style' => $image_style,
    ]),
  ];
}