You are here

public function WebformRating::getTestValues in Webform 6.x

Same name and namespace in other branches
  1. 8.5 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\WebformElement

Code

public function getTestValues(array $element, WebformInterface $webform, array $options = []) {
  $element += [
    '#min' => 0,
    '#max' => 5,
  ];
  return parent::getTestValues($element, $webform, $options);
}