function TextareaWithSummaryWidget::settingsSummary

Same name in other branches
  1. 9 core/modules/text/src/Plugin/Field/FieldWidget/TextareaWithSummaryWidget.php \Drupal\text\Plugin\Field\FieldWidget\TextareaWithSummaryWidget::settingsSummary()
  2. 8.9.x core/modules/text/src/Plugin/Field/FieldWidget/TextareaWithSummaryWidget.php \Drupal\text\Plugin\Field\FieldWidget\TextareaWithSummaryWidget::settingsSummary()
  3. 11.x core/modules/text/src/Plugin/Field/FieldWidget/TextareaWithSummaryWidget.php \Drupal\text\Plugin\Field\FieldWidget\TextareaWithSummaryWidget::settingsSummary()

Overrides StringTextareaWidget::settingsSummary

File

core/modules/text/src/Plugin/Field/FieldWidget/TextareaWithSummaryWidget.php, line 57

Class

TextareaWithSummaryWidget
Plugin implementation of the 'text_textarea_with_summary' widget.

Namespace

Drupal\text\Plugin\Field\FieldWidget

Code

public function settingsSummary() {
    $summary = parent::settingsSummary();
    $summary[] = $this->t('Number of summary rows: @rows', [
        '@rows' => $this->getSetting('summary_rows'),
    ]);
    if ($this->getSetting('show_summary')) {
        $summary[] = $this->t('Summary field will always be visible');
    }
    return $summary;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.