You are here

public static function StringTextfieldWithCounterWidget::defaultSettings in Textfield Counter 8

Defines the default settings for this plugin.

Return value

array A list of default settings, keyed by the setting name.

Overrides StringTextfieldWidget::defaultSettings

File

src/Plugin/Field/FieldWidget/StringTextfieldWithCounterWidget.php, line 27

Class

StringTextfieldWithCounterWidget
Plugin implementation of the 'string_textfield_with_counter' widget.

Namespace

Drupal\textfield_counter\Plugin\Field\FieldWidget

Code

public static function defaultSettings() {
  return [
    'use_field_maxlength' => 0,
    'maxlength' => 0,
    'counter_position' => 'after',
    'js_prevent_submit' => TRUE,
    'count_html_characters' => TRUE,
    'textcount_status_message' => self::getDefaultTextCountStatusMessage(),
  ] + parent::defaultSettings();
}