Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / modules / shortcut / src / Controller / ShortcutController.php
index 4f33b0b555737fb5b15545047313e624e577f76d..dbb24e582e9257748106621563123a4272582b05 100644 (file)
@@ -40,10 +40,10 @@ class ShortcutController extends ControllerBase {
 
     try {
       $shortcut->delete();
-      drupal_set_message($this->t('The shortcut %title has been deleted.', ['%title' => $label]));
+      $this->messenger()->addStatus($this->t('The shortcut %title has been deleted.', ['%title' => $label]));
     }
     catch (\Exception $e) {
-      drupal_set_message($this->t('Unable to delete the shortcut for %title.', ['%title' => $label]), 'error');
+      $this->messenger()->addStatus($this->t('Unable to delete the shortcut for %title.', ['%title' => $label]), 'error');
     }
 
     return $this->redirect('<front>');