public function TextFieldCounterWidgetTrait::addCountHtmlSummary 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::addCountHtmlSummary()
- 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 260
Class
- TextFieldCounterWidgetTrait
- Textfield counter trait. Adds textfield counting functionality.
Namespace
Drupal\textfield_counter\Plugin\Field\FieldWidgetCode
public function addCountHtmlSummary(array &$summary) {
if ($this
->getSetting('maxlength') || $this
->getSetting('use_field_maxlength')) {
$summary['count_html_characters'] = $this
->t('Include HTML characters in the character count: %count_html_characters', [
'%count_html_characters' => $this
->getSetting('count_html_characters') ? $this
->t('Yes') : $this
->t('No'),
]);
}
}