You are here

public static function WebformRating::processWebformRating in Webform 8.5

Same name and namespace in other branches
  1. 6.x src/Element/WebformRating.php \Drupal\webform\Element\WebformRating::processWebformRating()

Expand rating elements.

File

src/Element/WebformRating.php, line 41

Class

WebformRating
Provides a webform element for entering a rating.

Namespace

Drupal\webform\Element

Code

public static function processWebformRating(&$element, FormStateInterface $form_state, &$complete_form) {

  // Add validate callback.
  $element['#element_validate'] = [
    [
      get_called_class(),
      'validateWebformRating',
    ],
  ];
  return $element;
}