You are here

public function WebformRating::getInfo in Webform 6.x

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

Returns the element properties for this element.

Return value

array An array of element properties. See \Drupal\Core\Render\ElementInfoManagerInterface::getInfo() for documentation of the standard properties of all elements, and the return value format.

Overrides Range::getInfo

File

src/Element/WebformRating.php, line 20

Class

WebformRating
Provides a webform element for entering a rating.

Namespace

Drupal\webform\Element

Code

public function getInfo() {
  $class = get_class($this);
  return [
    '#min' => 0,
    '#max' => 5,
    '#step' => 1,
    '#star_size' => 'medium',
    '#reset' => FALSE,
    '#process' => [
      [
        $class,
        'processWebformRating',
      ],
    ],
    '#pre_render' => [
      [
        $class,
        'preRenderWebformRating',
      ],
    ],
    '#theme' => 'input__webform_rating',
  ] + parent::getInfo();
}