You are here

public function FileDeleteForm::getQuestion in File Delete (D8/D9) 8

Same name and namespace in other branches
  1. 2.1.x src/Form/FileDeleteForm.php \Drupal\file_delete\Form\FileDeleteForm::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/FileDeleteForm.php, line 57

Class

FileDeleteForm
Provides a form for deleting a File.

Namespace

Drupal\file_delete\Form

Code

public function getQuestion() {
  return $this
    ->t('Are you sure you want to delete the file %file_name (%file_path) ?', [
    '%file_name' => $this->entity
      ->getFilename(),
    '%file_path' => $this->entity
      ->getFileUri(),
  ]);
}