public function TextareaWithSummaryWidget::settingsSummary in Drupal 8
Same name and namespace in other branches
- 9 core/modules/text/src/Plugin/Field/FieldWidget/TextareaWithSummaryWidget.php \Drupal\text\Plugin\Field\FieldWidget\TextareaWithSummaryWidget::settingsSummary()
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 StringTextareaWidget::settingsSummary
File
- core/
modules/ text/ src/ Plugin/ Field/ FieldWidget/ TextareaWithSummaryWidget.php, line 58
Class
- TextareaWithSummaryWidget
- Plugin implementation of the 'text_textarea_with_summary' widget.
Namespace
Drupal\text\Plugin\Field\FieldWidgetCode
public function settingsSummary() {
$summary = parent::settingsSummary();
$summary[] = t('Number of summary rows: @rows', [
'@rows' => $this
->getSetting('summary_rows'),
]);
if ($this
->getSetting('show_summary')) {
$summary[] = t('Summary field will always be visible');
}
return $summary;
}