protected function WebformRating::defineDefaultProperties in Webform 6.x
Same name and namespace in other branches
- 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\WebformElementCode
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;
}