public function WebformScale::preview in Webform 6.x
Same name and namespace in other branches
- 8.5 src/Plugin/WebformElement/WebformScale.php \Drupal\webform\Plugin\WebformElement\WebformScale::preview()
Generate a renderable preview of the element.
Return value
array A renderable preview of the element.
Overrides WebformElementBase::preview
File
- src/
Plugin/ WebformElement/ WebformScale.php, line 57
Class
- WebformScale
- Provides a 'scale' element.
Namespace
Drupal\webform\Plugin\WebformElementCode
public function preview() {
return parent::preview() + [
'#min' => 1,
'#max' => 5,
];
}