Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / modules / views_ui / src / ViewAddForm.php
index e76621f2b36cbb2dde2a1c395f40c18a6c130e7a..7ba511e7059a88ac4cb1ab98b2533ec24023c80e 100644 (file)
@@ -184,12 +184,12 @@ class ViewAddForm extends ViewFormBase {
     }
     // @todo Figure out whether it really makes sense to throw and catch exceptions on the wizard.
     catch (WizardException $e) {
-      drupal_set_message($e->getMessage(), 'error');
+      $this->messenger()->addError($e->getMessage());
       $form_state->setRedirect('entity.view.collection');
       return;
     }
     $this->entity->save();
-    drupal_set_message($this->t('The view %name has been saved.', ['%name' => $form_state->getValue('label')]));
+    $this->messenger()->addStatus($this->t('The view %name has been saved.', ['%name' => $form_state->getValue('label')]));
     $form_state->setRedirectUrl($this->entity->urlInfo('edit-form'));
   }