public function WebformElementBase::preview in Webform 8.5
Same name and namespace in other branches
- 6.x src/Plugin/WebformElementBase.php \Drupal\webform\Plugin\WebformElementBase::preview()
Generate a renderable preview of the element.
Return value
array A renderable preview of the element.
Overrides WebformElementInterface::preview
16 calls to WebformElementBase::preview()
- Captcha::preview in src/
Plugin/ WebformElement/ Captcha.php - Generate a renderable preview of the element.
- Item::preview in src/
Plugin/ WebformElement/ Item.php - Generate a renderable preview of the element.
- Number::preview in src/
Plugin/ WebformElement/ Number.php - Generate a renderable preview of the element.
- OptionsBase::preview in src/
Plugin/ WebformElement/ OptionsBase.php - Generate a renderable preview of the element.
- ProcessedText::preview in src/
Plugin/ WebformElement/ ProcessedText.php - Generate a renderable preview of the element.
37 methods override WebformElementBase::preview()
- Captcha::preview in src/
Plugin/ WebformElement/ Captcha.php - Generate a renderable preview of the element.
- Hidden::preview in src/
Plugin/ WebformElement/ Hidden.php - Generate a renderable preview of the element.
- Item::preview in src/
Plugin/ WebformElement/ Item.php - Generate a renderable preview of the element.
- Number::preview in src/
Plugin/ WebformElement/ Number.php - Generate a renderable preview of the element.
- OptionsBase::preview in src/
Plugin/ WebformElement/ OptionsBase.php - Generate a renderable preview of the element.
File
- src/
Plugin/ WebformElementBase.php, line 1877
Class
- WebformElementBase
- Provides a base class for a webform element.
Namespace
Drupal\webform\PluginCode
public function preview() {
return [
'#type' => $this
->getTypeName(),
'#title' => $this
->getPluginLabel(),
];
}