Same name and namespace in other branches
  1. 8.9.x core/lib/Drupal/Core/Entity/Form/DeleteMultipleForm.php \Drupal\Core\Entity\Form\DeleteMultipleForm::getQuestion()
  2. 9 core/lib/Drupal/Core/Entity/Form/DeleteMultipleForm.php \Drupal\Core\Entity\Form\DeleteMultipleForm::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

1 method overrides DeleteMultipleForm::getQuestion()
ConfirmDeleteMultiple::getQuestion in core/modules/comment/src/Form/ConfirmDeleteMultiple.php
Returns the question to ask the user.

File

core/lib/Drupal/Core/Entity/Form/DeleteMultipleForm.php, line 122

Class

DeleteMultipleForm
Provides an entities deletion confirmation form.

Namespace

Drupal\Core\Entity\Form

Code

public function getQuestion() {
  return $this
    ->formatPlural(count($this->selection), 'Are you sure you want to delete this @item?', 'Are you sure you want to delete these @items?', [
    '@item' => $this->entityType
      ->getSingularLabel(),
    '@items' => $this->entityType
      ->getPluralLabel(),
  ]);
}