X-Git-Url: https://yaffs.net/gitweb/?a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fviews_ui%2Fsrc%2FViewUI.php;h=de323bd277ae9f7d9a4f205ef160d37080013d19;hb=f3baf763d342a5f82576890e2a8111a5aaf139dc;hp=2e7fabd62bf0c0413cdeda1ff53284043c61fe29;hpb=bfbba508964731508b9bd6d5835c2edc858db95b;p=yaffs-website diff --git a/web/core/modules/views_ui/src/ViewUI.php b/web/core/modules/views_ui/src/ViewUI.php index 2e7fabd62..de323bd27 100644 --- a/web/core/modules/views_ui/src/ViewUI.php +++ b/web/core/modules/views_ui/src/ViewUI.php @@ -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); } /**