You are here

public function WebformVariantDeleteForm::getQuestion in Webform 6.x

Same name and namespace in other branches
  1. 8.5 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\Form

Code

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);
  }
}