Added Entity and Entity Reference Revisions which got dropped somewhere along the...
[yaffs-website] / web / core / modules / views_ui / src / ViewUI.php
index 2e7fabd62bf0c0413cdeda1ff53284043c61fe29..de323bd277ae9f7d9a4f205ef160d37080013d19 100644 (file)
@@ -48,10 +48,10 @@ class ViewUI implements ViewEntityInterface {
    * If this view is locked for editing.
    *
    * If this view is locked it will contain the result of
-   * \Drupal\user\SharedTempStore::getMetadata(). Which can be a stdClass or
+   * \Drupal\Core\TempStore\SharedTempStore::getMetadata(). Which can be a stdClass or
    * NULL.
    *
-   * @var stdClass
+   * @var object
    */
   public $lock;
 
@@ -713,7 +713,7 @@ class ViewUI implements ViewEntityInterface {
                 'data' => [
                   '#markup' => $path,
                 ],
-              ]
+              ],
             ];
           }
           if ($show_stats) {
@@ -790,7 +790,7 @@ class ViewUI implements ViewEntityInterface {
     else {
       foreach ($errors as $display_errors) {
         foreach ($display_errors as $error) {
-          drupal_set_message($error, 'error');
+          \Drupal::messenger()->addError($error);
         }
       }
       $preview = ['#markup' => t('Unable to preview due to validation errors.')];
@@ -855,11 +855,11 @@ class ViewUI implements ViewEntityInterface {
   }
 
   /**
-   * Sets a cached view object in the user tempstore.
+   * Sets a cached view object in the shared tempstore.
    */
   public function cacheSet() {
     if ($this->isLocked()) {
-      drupal_set_message(t('Changes cannot be made to a locked view.'), 'error');
+      \Drupal::messenger()->addError(t('Changes cannot be made to a locked view.'));
       return;
     }
 
@@ -878,7 +878,7 @@ class ViewUI implements ViewEntityInterface {
     $executable->default_display = NULL;
     $executable->query = NULL;
     $executable->displayHandlers = NULL;
-    \Drupal::service('user.shared_tempstore')->get('views')->set($this->id(), $this);
+    \Drupal::service('tempstore.shared')->get('views')->set($this->id(), $this);
   }
 
   /**