You are here

public function WebformRating::preview in Webform 6.x

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

Generate a renderable preview of the element.

Return value

array A renderable preview of the element.

Overrides Range::preview

File

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

Class

WebformRating
Provides a 'rating' element.

Namespace

Drupal\webform\Plugin\WebformElement

Code

public function preview() {
  return [
    '#type' => $this
      ->getTypeName(),
    '#title' => $this
      ->getPluginLabel(),
  ];
}