summaryrefslogtreecommitdiffstats
path: root/core/modules/system/src/Form/ModulesUninstallConfirmForm.php
diff options
context:
space:
mode:
Diffstat (limited to 'core/modules/system/src/Form/ModulesUninstallConfirmForm.php')
-rw-r--r--core/modules/system/src/Form/ModulesUninstallConfirmForm.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/modules/system/src/Form/ModulesUninstallConfirmForm.php b/core/modules/system/src/Form/ModulesUninstallConfirmForm.php
index f55f0d6..a9783a9 100644
--- a/core/modules/system/src/Form/ModulesUninstallConfirmForm.php
+++ b/core/modules/system/src/Form/ModulesUninstallConfirmForm.php
@@ -131,7 +131,7 @@ class ModulesUninstallConfirmForm extends ConfirmFormBase {
// Prevent this page from showing when the module list is empty.
if (empty($this->modules)) {
- drupal_set_message($this->t('The selected modules could not be uninstalled, either due to a website problem or due to the uninstall confirmation form timing out. Please try again.'), 'error');
+ $this->messenger()->addError($this->t('The selected modules could not be uninstalled, either due to a website problem or due to the uninstall confirmation form timing out. Please try again.'));
return $this->redirect('system.modules_uninstall');
}
@@ -161,7 +161,7 @@ class ModulesUninstallConfirmForm extends ConfirmFormBase {
// Uninstall the modules.
$this->moduleInstaller->uninstall($this->modules);
- drupal_set_message($this->t('The selected modules have been uninstalled.'));
+ $this->messenger()->addStatus($this->t('The selected modules have been uninstalled.'));
$form_state->setRedirectUrl($this->getCancelUrl());
}