Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / modules / shortcut / src / Controller / ShortcutSetController.php
index 58a68d70e0d4c2a557d68b516d2817de5f56752a..541d43796cf34341bdae339ba3483ca7569538f6 100644 (file)
@@ -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>');