You are here

public function FieldTimerCountdownFormatterBase::settingsSummary in Field Timer 8

Same name and namespace in other branches
  1. 2.x src/Plugin/Field/FieldFormatter/FieldTimerCountdownFormatterBase.php \Drupal\field_timer\Plugin\Field\FieldFormatter\FieldTimerCountdownFormatterBase::settingsSummary()

Returns a short summary for the current formatter settings.

If an empty result is returned, a UI can still be provided to display a settings form in case the formatter has configurable settings.

Return value

string[] A short summary of the formatter settings.

Overrides FormatterBase::settingsSummary

2 calls to FieldTimerCountdownFormatterBase::settingsSummary()
FieldTimerCountdownFormatter::settingsSummary in src/Plugin/Field/FieldFormatter/FieldTimerCountdownFormatter.php
Returns a short summary for the current formatter settings.
FieldTimerCountdownLedFormatter::settingsSummary in src/Plugin/Field/FieldFormatter/FieldTImerCountdownLedFormatter.php
Returns a short summary for the current formatter settings.
2 methods override FieldTimerCountdownFormatterBase::settingsSummary()
FieldTimerCountdownFormatter::settingsSummary in src/Plugin/Field/FieldFormatter/FieldTimerCountdownFormatter.php
Returns a short summary for the current formatter settings.
FieldTimerCountdownLedFormatter::settingsSummary in src/Plugin/Field/FieldFormatter/FieldTImerCountdownLedFormatter.php
Returns a short summary for the current formatter settings.

File

src/Plugin/Field/FieldFormatter/FieldTimerCountdownFormatterBase.php, line 90

Class

FieldTimerCountdownFormatterBase
Base implementation of formatters that uses jQuery Countdown plugin.

Namespace

Drupal\field_timer\Plugin\Field\FieldFormatter

Code

public function settingsSummary() {
  $summary = parent::settingsSummary();
  $type = $this
    ->getSetting('type');
  $summary[] = $this
    ->t('Type: @type', [
    '@type' => $this
      ->typeOptions()[$type],
  ]);
  return $summary;
}