You are here

public function YamlFormRating::getInfo in YAML Form 8

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/YamlFormRating.php, line 18

Class

YamlFormRating
Provides a form element for entering a rating.

Namespace

Drupal\yamlform\Element

Code

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