You are here

protected function WebformScale::defineDefaultProperties in Webform 8.5

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

Define an element's default properties.

Return value

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

Overrides NumericBase::defineDefaultProperties

File

src/Plugin/WebformElement/WebformScale.php, line 22

Class

WebformScale
Provides a 'scale' element.

Namespace

Drupal\webform\Plugin\WebformElement

Code

protected function defineDefaultProperties() {
  $properties = [
    'min' => 1,
    'max' => 5,
    'min_text' => '',
    'max_text' => '',
    'scale_size' => 'medium',
    'scale_type' => 'circle',
    'scale_text' => 'below',
    // Wrapper.
    'wrapper_type' => 'fieldset',
  ] + 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;
}