public function WebformUiElementDeleteForm::getDescription in Webform 8.5
Same name and namespace in other branches
- 6.x modules/webform_ui/src/Form/WebformUiElementDeleteForm.php \Drupal\webform_ui\Form\WebformUiElementDeleteForm::getDescription()
Returns additional text to display as a description.
Return value
\Drupal\Core\StringTranslation\TranslatableMarkup The form description.
Overrides WebformDeleteFormBase::getDescription
File
- modules/
webform_ui/ src/ Form/ WebformUiElementDeleteForm.php, line 137
Class
- WebformUiElementDeleteForm
- Webform for deleting a webform element.
Namespace
Drupal\webform_ui\FormCode
public function getDescription() {
$element_plugin = $this
->getWebformElementPlugin();
$items = [];
$items[] = $this
->t('Remove this element');
$items[] = $this
->t('Delete any submission data associated with this element');
if ($element_plugin
->isContainer($this->element)) {
$items[] = $this
->t('Delete all child elements');
}
if ($element_plugin instanceof WebformElementVariantInterface) {
$items[] = $this
->t('Delete all related variants');
}
return [
'title' => [
'#markup' => $this
->t('This action will…'),
],
'list' => [
'#theme' => 'item_list',
'#items' => $items,
],
];
}