You are here

public function WebformRating::getItemFormats in Webform 8.5

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

Get an element's available single value formats.

Return value

array An associative array of single value formats containing name/label pairs.

Overrides WebformElementBase::getItemFormats

File

src/Plugin/WebformElement/WebformRating.php, line 91

Class

WebformRating
Provides a 'rating' element.

Namespace

Drupal\webform\Plugin\WebformElement

Code

public function getItemFormats() {
  return parent::getItemFormats() + [
    'star' => $this
      ->t('Star'),
  ];
}