summaryrefslogtreecommitdiffstats
path: root/core/modules/shortcut/src/Controller/ShortcutController.php
diff options
context:
space:
mode:
Diffstat (limited to 'core/modules/shortcut/src/Controller/ShortcutController.php')
-rw-r--r--core/modules/shortcut/src/Controller/ShortcutController.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/modules/shortcut/src/Controller/ShortcutController.php b/core/modules/shortcut/src/Controller/ShortcutController.php
index 4f33b0b..dbb24e5 100644
--- a/core/modules/shortcut/src/Controller/ShortcutController.php
+++ b/core/modules/shortcut/src/Controller/ShortcutController.php
@@ -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>');