You are here

public function YamlFormRating::prepare in YAML Form 8

Prepare an element to be rendered within a form.

Parameters

array $element: An element.

\Drupal\yamlform\YamlFormSubmissionInterface $yamlform_submission: A form submission.

Overrides Range::prepare

File

src/Plugin/YamlFormElement/YamlFormRating.php, line 43

Class

YamlFormRating
Provides a 'rating' element.

Namespace

Drupal\yamlform\Plugin\YamlFormElement

Code

public function prepare(array &$element, YamlFormSubmissionInterface $yamlform_submission) {
  if (!isset($element['#step'])) {
    $element['#step'] = 1;
  }
  parent::prepare($element, $yamlform_submission);
}