You are here

public function TextFieldCounterWidgetTrait::addTextCountStatusMessageSummary in Textfield Counter 8

Adds the summary of the count_html_characters setting.

Parameters

array $summary: The array of summaries to which the summary should be added.

5 calls to TextFieldCounterWidgetTrait::addTextCountStatusMessageSummary()
StringTextareaWithCounterWidget::settingsSummary in src/Plugin/Field/FieldWidget/StringTextareaWithCounterWidget.php
Returns a short summary for the current widget settings.
StringTextfieldWithCounterWidget::settingsSummary in src/Plugin/Field/FieldWidget/StringTextfieldWithCounterWidget.php
Returns a short summary for the current widget settings.
TextareaWithCounterWidget::settingsSummary in src/Plugin/Field/FieldWidget/TextareaWithCounterWidget.php
Returns a short summary for the current widget settings.
TextareaWithSummaryAndCounterWidget::settingsSummary in src/Plugin/Field/FieldWidget/TextareaWithSummaryAndCounterWidget.php
Returns a short summary for the current widget settings.
TextfieldWithCounterWidget::settingsSummary in src/Plugin/Field/FieldWidget/TextfieldWithCounterWidget.php
Returns a short summary for the current widget settings.

File

src/Plugin/Field/FieldWidget/TextFieldCounterWidgetTrait.php, line 272

Class

TextFieldCounterWidgetTrait
Textfield counter trait. Adds textfield counting functionality.

Namespace

Drupal\textfield_counter\Plugin\Field\FieldWidget

Code

public function addTextCountStatusMessageSummary(array &$summary) {
  if ($this
    ->getSetting('maxlength') || $this
    ->getSetting('use_field_maxlength')) {
    $summary['textcount_status_message'] = $this
      ->t('Status Message: %status_message', [
      '%status_message' => $this
        ->getSetting('textcount_status_message'),
    ]);
  }
}