You are here

protected function Range::defineDefaultProperties in Webform 6.x

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

Define an element's default properties.

Return value

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

Overrides NumericBase::defineDefaultProperties

1 call to Range::defineDefaultProperties()
WebformRating::defineDefaultProperties in src/Plugin/WebformElement/WebformRating.php
Define an element's default properties.
1 method overrides Range::defineDefaultProperties()
WebformRating::defineDefaultProperties in src/Plugin/WebformElement/WebformRating.php
Define an element's default properties.

File

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

Class

Range
Provides a 'range' element.

Namespace

Drupal\webform\Plugin\WebformElement

Code

protected function defineDefaultProperties() {
  $properties = [
    // Number settings.
    'min' => 0,
    'max' => 100,
    'step' => 1,
    // Output settings.
    'output' => '',
    'output__field_prefix' => '',
    'output__field_suffix' => '',
    'output__attributes' => [],
  ] + parent::defineDefaultProperties();
  unset($properties['size'], $properties['minlength'], $properties['maxlength'], $properties['placeholder'], $properties['autocomplete'], $properties['format_items'], $properties['format_items_html'], $properties['format_items_text']);
  return $properties;
}