public function WebformSame::preview in Webform 6.x
Same name and namespace in other branches
- 8.5 src/Plugin/WebformElement/WebformSame.php \Drupal\webform\Plugin\WebformElement\WebformSame::preview()
Generate a renderable preview of the element.
Return value
array A renderable preview of the element.
Overrides WebformElementBase::preview
File
- src/
Plugin/ WebformElement/ WebformSame.php, line 205
Class
- WebformSame
- Provides a 'webform_same' element.
Namespace
Drupal\webform\Plugin\WebformElementCode
public function preview() {
return [
'#type' => $this
->getTypeName(),
'#title' => $this
->t('Billing address is the same as the shipping address'),
];
}