public function MediaDeleteForm::getQuestion in Media Directories 8
Same name and namespace in other branches
- 3.x modules/media_directories_ui/src/Form/MediaDeleteForm.php \Drupal\media_directories_ui\Form\MediaDeleteForm::getQuestion()
- 2.x modules/media_directories_ui/src/Form/MediaDeleteForm.php \Drupal\media_directories_ui\Form\MediaDeleteForm::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 call to MediaDeleteForm::getQuestion()
- MediaDeleteForm::buildForm in modules/
media_directories_ui/ src/ Form/ MediaDeleteForm.php - Form constructor.
File
- modules/
media_directories_ui/ src/ Form/ MediaDeleteForm.php, line 33
Class
- MediaDeleteForm
- A form to delete medias.
Namespace
Drupal\media_directories_ui\FormCode
public function getQuestion() {
if (count($this->entities) > 1) {
return $this
->t('Do you want to delete @count items?', [
'@count' => count($this->entities),
]);
}
$first_entity = reset($this->entities);
return $this
->t('Do you want to delete @name?', [
'@name' => $first_entity
->getName(),
]);
}