Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. StringTextareaWidget.php

function StringTextareaWidget::settingsSummary

Overrides WidgetBase::settingsSummary

2 calls to StringTextareaWidget::settingsSummary()
TextareaWithSummaryWidget::settingsSummary in core/modules/text/src/Plugin/Field/FieldWidget/TextareaWithSummaryWidget.php
Returns a short summary for the current widget settings.
TextareaWithSummaryWidget::settingsSummary in core/modules/text/src/Plugin/Field/FieldWidget/TextareaWithSummaryWidget.php
Returns a short summary for the current widget settings.
1 method overrides StringTextareaWidget::settingsSummary()
TextareaWithSummaryWidget::settingsSummary in core/modules/text/src/Plugin/Field/FieldWidget/TextareaWithSummaryWidget.php
Returns a short summary for the current widget settings.

File

core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/StringTextareaWidget.php, line 54

Class

StringTextareaWidget
Plugin implementation of the 'string_textarea' widget.

Namespace

Drupal\Core\Field\Plugin\Field\FieldWidget

Code

public function settingsSummary() {
    $summary = [];
    $summary[] = $this->t('Number of rows: @rows', [
        '@rows' => $this->getSetting('rows'),
    ]);
    $placeholder = $this->getSetting('placeholder');
    if (!empty($placeholder)) {
        $summary[] = $this->t('Placeholder: @placeholder', [
            '@placeholder' => $placeholder,
        ]);
    }
    return $summary;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal