* 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;
'data' => [
'#markup' => $path,
],
- ]
+ ],
];
}
if ($show_stats) {
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.')];
}
/**
- * 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;
}
$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);
}
/**