You are here

public function PaymentForm::settingsSummary in Payment 8.2

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

modules/payment_form/src/Plugin/Field/FieldWidget/PaymentForm.php, line 70

Class

PaymentForm
A payment configuration widget.

Namespace

Drupal\payment_form\Plugin\Field\FieldWidget

Code

public function settingsSummary() {
  return [
    $this
      ->formatPlural(count($this
      ->getSetting('line_items')), '1 line item.', '@count line items'),
  ];
}