summaryrefslogtreecommitdiffstats
path: root/core/modules/node/src/Form/NodeRevisionRevertForm.php
diff options
context:
space:
mode:
Diffstat (limited to 'core/modules/node/src/Form/NodeRevisionRevertForm.php')
-rw-r--r--core/modules/node/src/Form/NodeRevisionRevertForm.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/core/modules/node/src/Form/NodeRevisionRevertForm.php b/core/modules/node/src/Form/NodeRevisionRevertForm.php
index 246654b..cbd7e86 100644
--- a/core/modules/node/src/Form/NodeRevisionRevertForm.php
+++ b/core/modules/node/src/Form/NodeRevisionRevertForm.php
@@ -134,7 +134,12 @@ class NodeRevisionRevertForm extends ConfirmFormBase {
$this->revision->save();
$this->logger('content')->notice('@type: reverted %title revision %revision.', ['@type' => $this->revision->bundle(), '%title' => $this->revision->label(), '%revision' => $this->revision->getRevisionId()]);
- drupal_set_message(t('@type %title has been reverted to the revision from %revision-date.', ['@type' => node_get_type_label($this->revision), '%title' => $this->revision->label(), '%revision-date' => $this->dateFormatter->format($original_revision_timestamp)]));
+ $this->messenger()
+ ->addStatus($this->t('@type %title has been reverted to the revision from %revision-date.', [
+ '@type' => node_get_type_label($this->revision),
+ '%title' => $this->revision->label(),
+ '%revision-date' => $this->dateFormatter->format($original_revision_timestamp),
+ ]));
$form_state->setRedirect(
'entity.node.version_history',
['node' => $this->revision->id()]