You are here

public function WebformUiElementDeleteForm::getQuestion in Webform 8.5

Same name and namespace in other branches
  1. 6.x modules/webform_ui/src/Form/WebformUiElementDeleteForm.php \Drupal\webform_ui\Form\WebformUiElementDeleteForm::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

modules/webform_ui/src/Form/WebformUiElementDeleteForm.php, line 105

Class

WebformUiElementDeleteForm
Webform for deleting a webform element.

Namespace

Drupal\webform_ui\Form

Code

public function getQuestion() {
  if ($this
    ->isDialog()) {
    $t_args = [
      '@title' => $this
        ->getElementTitle(),
    ];
    return $this
      ->t("Delete the '@title' element?", $t_args);
  }
  else {
    $t_args = [
      '%webform' => $this->webform
        ->label(),
      '%title' => $this
        ->getElementTitle(),
    ];
    return $this
      ->t('Delete the %title element from the %webform webform?', $t_args);
  }
}