You are here

public function RgDefaultWidget::settingsSummary in Brazilian IDs 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/RgDefaultWidget.php, line 62

Class

RgDefaultWidget
Plugin annotation @FieldWidget( id = "brazilian_ids_rg_default", label = @Translation("Default"), field_types = { "brazilian_ids_rg", } )

Namespace

Drupal\brazilian_ids\Plugin\Field\FieldWidget

Code

public function settingsSummary() {
  $clean_number = $this
    ->getSetting('clean_number') ? t('Yes') : t('No');
  $summary[] = t('Clean number: @clean_number', [
    '@clean_number' => $clean_number,
  ]);
  return $summary;
}