summaryrefslogtreecommitdiffstats
path: root/core/modules/views_ui
diff options
context:
space:
mode:
Diffstat (limited to 'core/modules/views_ui')
-rw-r--r--core/modules/views_ui/src/Form/AdvancedSettingsForm.php2
-rw-r--r--core/modules/views_ui/src/Form/BreakLockForm.php2
-rw-r--r--core/modules/views_ui/src/ViewAddForm.php4
-rw-r--r--core/modules/views_ui/src/ViewEditForm.php2
-rw-r--r--core/modules/views_ui/src/ViewUI.php4
5 files changed, 7 insertions, 7 deletions
diff --git a/core/modules/views_ui/src/Form/AdvancedSettingsForm.php b/core/modules/views_ui/src/Form/AdvancedSettingsForm.php
index e4aa1c1..534006c 100644
--- a/core/modules/views_ui/src/Form/AdvancedSettingsForm.php
+++ b/core/modules/views_ui/src/Form/AdvancedSettingsForm.php
@@ -103,7 +103,7 @@ class AdvancedSettingsForm extends ConfigFormBase {
*/
public function cacheSubmit() {
views_invalidate_cache();
- drupal_set_message($this->t('The cache has been cleared.'));
+ $this->messenger()->addStatus($this->t('The cache has been cleared.'));
}
}
diff --git a/core/modules/views_ui/src/Form/BreakLockForm.php b/core/modules/views_ui/src/Form/BreakLockForm.php
index 6e93848..9153575 100644
--- a/core/modules/views_ui/src/Form/BreakLockForm.php
+++ b/core/modules/views_ui/src/Form/BreakLockForm.php
@@ -110,7 +110,7 @@ class BreakLockForm extends EntityConfirmFormBase {
public function submitForm(array &$form, FormStateInterface $form_state) {
$this->tempStore->delete($this->entity->id());
$form_state->setRedirectUrl($this->entity->urlInfo('edit-form'));
- drupal_set_message($this->t('The lock has been broken and you may now edit this view.'));
+ $this->messenger()->addStatus($this->t('The lock has been broken and you may now edit this view.'));
}
}
diff --git a/core/modules/views_ui/src/ViewAddForm.php b/core/modules/views_ui/src/ViewAddForm.php
index e76621f..7ba511e 100644
--- a/core/modules/views_ui/src/ViewAddForm.php
+++ b/core/modules/views_ui/src/ViewAddForm.php
@@ -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'));
}
diff --git a/core/modules/views_ui/src/ViewEditForm.php b/core/modules/views_ui/src/ViewEditForm.php
index cea587e..124795a 100644
--- a/core/modules/views_ui/src/ViewEditForm.php
+++ b/core/modules/views_ui/src/ViewEditForm.php
@@ -325,7 +325,7 @@ class ViewEditForm extends ViewFormBase {
$view->save();
- drupal_set_message($this->t('The view %name has been saved.', ['%name' => $view->label()]));
+ $this->messenger()->addStatus($this->t('The view %name has been saved.', ['%name' => $view->label()]));
// Remove this view from cache so we can edit it properly.
$this->tempStore->delete($view->id());
diff --git a/core/modules/views_ui/src/ViewUI.php b/core/modules/views_ui/src/ViewUI.php
index b2be658..beb5fff 100644
--- a/core/modules/views_ui/src/ViewUI.php
+++ b/core/modules/views_ui/src/ViewUI.php
@@ -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.')];
@@ -859,7 +859,7 @@ class ViewUI implements ViewEntityInterface {
*/
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;
}