Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / modules / system / src / Form / ModulesUninstallConfirmForm.php
index f55f0d69ec5a5b84329560cf6b4910bd4d59ef9a..a9783a908fca499dfb42bdf35f63e376ae9b64d8 100644 (file)
@@ -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());
   }