You are here

protected function WebformRating::defineDefaultProperties in Webform 6.x

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

Define an element's default properties.

Return value

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

Overrides Range::defineDefaultProperties

File

src/Plugin/WebformElement/WebformRating.php, line 25

Class

WebformRating
Provides a 'rating' element.

Namespace

Drupal\webform\Plugin\WebformElement

Code

protected function defineDefaultProperties() {
  $properties = [
    // Number settings.
    'max' => 5,
    // General settings.
    'default_value' => 0,
    // Rating settings.
    'star_size' => 'medium',
    'reset' => FALSE,
  ] + parent::defineDefaultProperties();
  unset($properties['output'], $properties['output__field_prefix'], $properties['output__field_suffix'], $properties['output__attributes']);
  return $properties;
}