public function WebformHorizontalRule::preview in Webform 8.5
Same name and namespace in other branches
- 6.x src/Plugin/WebformElement/WebformHorizontalRule.php \Drupal\webform\Plugin\WebformElement\WebformHorizontalRule::preview()
Generate a renderable preview of the element.
Return value
array A renderable preview of the element.
Overrides WebformElementBase::preview
File
- src/
Plugin/ WebformElement/ WebformHorizontalRule.php, line 138
Class
- WebformHorizontalRule
- Provides a 'webform_horizontal_rule' element.
Namespace
Drupal\webform\Plugin\WebformElementCode
public function preview() {
return [
'#type' => $this
->getTypeName(),
'#attributes' => [
'class' => [
'webform-horizontal-rule--dotted',
'webform-horizontal-rule--thick',
],
],
];
}