You are here

protected function TextBase::defineDefaultProperties in Webform 8.5

Same name and namespace in other branches
  1. 6.x src/Plugin/WebformElement/TextBase.php \Drupal\webform\Plugin\WebformElement\TextBase::defineDefaultProperties()

Define an element's default properties.

Return value

array An associative array contain an the element's default properties.

Overrides WebformElementBase::defineDefaultProperties

6 calls to TextBase::defineDefaultProperties()
Email::defineDefaultProperties in src/Plugin/WebformElement/Email.php
Define an element's default properties.
Search::defineDefaultProperties in src/Plugin/WebformElement/Search.php
Define an element's default properties.
Telephone::defineDefaultProperties in src/Plugin/WebformElement/Telephone.php
Define an element's default properties.
Textarea::defineDefaultProperties in src/Plugin/WebformElement/Textarea.php
Define an element's default properties.
TextField::defineDefaultProperties in src/Plugin/WebformElement/TextField.php
Define an element's default properties.

... See full list

7 methods override TextBase::defineDefaultProperties()
Email::defineDefaultProperties in src/Plugin/WebformElement/Email.php
Define an element's default properties.
Hidden::defineDefaultProperties in src/Plugin/WebformElement/Hidden.php
Define an element's default properties.
Search::defineDefaultProperties in src/Plugin/WebformElement/Search.php
Define an element's default properties.
Telephone::defineDefaultProperties in src/Plugin/WebformElement/Telephone.php
Define an element's default properties.
Textarea::defineDefaultProperties in src/Plugin/WebformElement/Textarea.php
Define an element's default properties.

... See full list

File

src/Plugin/WebformElement/TextBase.php, line 23

Class

TextBase
Provides a base 'text' (field) class.

Namespace

Drupal\webform\Plugin\WebformElement

Code

protected function defineDefaultProperties() {
  return [
    'readonly' => FALSE,
    'size' => NULL,
    'minlength' => NULL,
    'maxlength' => NULL,
    'placeholder' => '',
    'autocomplete' => 'on',
    'pattern' => '',
    'pattern_error' => '',
  ] + parent::defineDefaultProperties();
}