function DeleteMultipleForm::getQuestion

Same name in other branches
  1. 9 core/lib/Drupal/Core/Entity/Form/DeleteMultipleForm.php \Drupal\Core\Entity\Form\DeleteMultipleForm::getQuestion()
  2. 10 core/lib/Drupal/Core/Entity/Form/DeleteMultipleForm.php \Drupal\Core\Entity\Form\DeleteMultipleForm::getQuestion()
  3. 11.x core/lib/Drupal/Core/Entity/Form/DeleteMultipleForm.php \Drupal\Core\Entity\Form\DeleteMultipleForm::getQuestion()

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(),
    ]);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.