You are here

public function SignaturePadWidget::settingsSummary in SignatureField 1.x

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/SignaturePadWidget.php, line 83

Class

SignaturePadWidget
Provides the signature pad widget for the signature field.

Namespace

Drupal\signaturefield\Plugin\Field\FieldWidget

Code

public function settingsSummary() {
  $summary = parent::settingsSummary();
  $summary[] = $this
    ->t('Dimensions: @widthx@heightpx', [
    '@width' => $this
      ->getSetting('width'),
    '@height' => $this
      ->getSetting('height'),
  ]);
  $summary[] = $this
    ->t('Pen color: @pen, background color: @background', [
    '@pen' => $this
      ->getSetting('pen_color'),
    '@background' => $this
      ->getSetting('background_color'),
  ]);
  return $summary;
}