You are here

protected function Textarea::defineDefaultProperties in Webform 8.5

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

Define an element's default properties.

Return value

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

Overrides TextBase::defineDefaultProperties

File

src/Plugin/WebformElement/Textarea.php, line 26

Class

Textarea
Provides a 'textarea' element.

Namespace

Drupal\webform\Plugin\WebformElement

Code

protected function defineDefaultProperties() {
  return [
    'title' => '',
    'default_value' => '',
    // Description/Help.
    'help' => '',
    'help_title' => '',
    'description' => '',
    'more' => '',
    'more_title' => '',
    // Form display.
    'title_display' => '',
    'description_display' => '',
    'help_display' => '',
    'field_prefix' => '',
    'field_suffix' => '',
    'placeholder' => '',
    'disabled' => FALSE,
    'readonly' => FALSE,
    'rows' => NULL,
    'maxlength' => NULL,
    // Form validation.
    'required' => FALSE,
    'required_error' => '',
    'unique' => FALSE,
    'unique_user' => FALSE,
    'unique_entity' => FALSE,
    'unique_error' => '',
    'counter_type' => '',
    'counter_minimum' => NULL,
    'counter_minimum_message' => '',
    'counter_maximum' => NULL,
    'counter_maximum_message' => '',
    // Attributes.
    'wrapper_attributes' => [],
    'label_attributes' => [],
    'attributes' => [],
    // Submission display.
    'format' => $this
      ->getItemDefaultFormat(),
    'format_html' => '',
    'format_text' => '',
    'format_items' => $this
      ->getItemsDefaultFormat(),
    'format_items_html' => '',
    'format_items_text' => '',
    'format_attributes' => [],
  ] + parent::defineDefaultProperties() + $this
    ->defineDefaultMultipleProperties();
}