public function MediaDeleteForm::getQuestion in Media Directories 3.x
Same name and namespace in other branches
- 8 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
File
- modules/
media_directories_ui/ src/ Form/ MediaDeleteForm.php, line 25
Class
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(),
]);
}