public function WebformRating::getTestValues in Webform 8.5
Same name and namespace in other branches
- 6.x src/Plugin/WebformElement/WebformRating.php \Drupal\webform\Plugin\WebformElement\WebformRating::getTestValues()
Get test values for an element.
Parameters
array $element: An element.
\Drupal\webform\WebformInterface $webform: A webform.
array $options: Options used to generate a test value.
Return value
mixed A test value for an element.
Overrides NumericBase::getTestValues
File
- src/
Plugin/ WebformElement/ WebformRating.php, line 49
Class
- WebformRating
- Provides a 'rating' element.
Namespace
Drupal\webform\Plugin\WebformElementCode
public function getTestValues(array $element, WebformInterface $webform, array $options = []) {
$element += [
'#min' => 0,
'#max' => 5,
];
return parent::getTestValues($element, $webform, $options);
}