summaryrefslogtreecommitdiffstats
path: root/core/modules/shortcut/src/Controller/ShortcutSetController.php
diff options
context:
space:
mode:
Diffstat (limited to 'core/modules/shortcut/src/Controller/ShortcutSetController.php')
-rw-r--r--core/modules/shortcut/src/Controller/ShortcutSetController.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/modules/shortcut/src/Controller/ShortcutSetController.php b/core/modules/shortcut/src/Controller/ShortcutSetController.php
index 58a68d7..541d437 100644
--- a/core/modules/shortcut/src/Controller/ShortcutSetController.php
+++ b/core/modules/shortcut/src/Controller/ShortcutSetController.php
@@ -65,10 +65,10 @@ class ShortcutSetController extends ControllerBase {
try {
$shortcut->save();
- drupal_set_message($this->t('Added a shortcut for %title.', ['%title' => $shortcut->label()]));
+ $this->messenger()->addStatus($this->t('Added a shortcut for %title.', ['%title' => $shortcut->label()]));
}
catch (\Exception $e) {
- drupal_set_message($this->t('Unable to add a shortcut for %title.', ['%title' => $shortcut->label()]), 'error');
+ $this->messenger()->addError($this->t('Unable to add a shortcut for %title.', ['%title' => $shortcut->label()]));
}
return $this->redirect('<front>');