public function WebformVariantDeleteForm::getQuestion in Webform 8.5
Same name and namespace in other branches
- 6.x src/Form/WebformVariantDeleteForm.php \Drupal\webform\Form\WebformVariantDeleteForm::getQuestion()
Returns the question to ask the user.
Return value
\Drupal\Core\StringTranslation\TranslatableMarkup The form question. The page title will be set to this value.
Overrides ConfirmFormInterface::getQuestion
File
- src/
Form/ WebformVariantDeleteForm.php, line 30
Class
- WebformVariantDeleteForm
- Form for deleting a webform variant.
Namespace
Drupal\webform\FormCode
public function getQuestion() {
if ($this
->isDialog()) {
$t_args = [
'@title' => $this->webformVariant
->label(),
];
return $this
->t("Delete the '@title' variant?", $t_args);
}
else {
$t_args = [
'%webform' => $this->webform
->label(),
'%title' => $this->webformVariant
->label(),
];
return $this
->t('Delete the %title variant from the %webform webform?', $t_args);
}
}