Skip to content
Snippets Groups Projects
Commit 77a27dd8 authored by Eric Bremner's avatar Eric Bremner Committed by Igor Biki
Browse files

ISTWECMS-4166: cleaning up submit function for content moderation

parent cbcdbcd4
1 merge request!8Feature/istwcms 4166 publish unpublish
......@@ -80,8 +80,17 @@ class UwContentModerationForm extends ConfirmFormBase {
*/
public function submitForm(array &$form, FormStateInterface $form_state) {
// Set the options for the URL.
$options = ['absolute' => TRUE];
// Return the URL back to the node.
$url = Url::fromRoute('entity.node.canonical', ['node' => $this->nid], $options);
// Adding the redirect back to the node
$form_state->setRedirectUrl($url);
// Set the message that the permissions have been saved.
$this->messenger()->addStatus($this->t('The changes have been saved.'));
$this->messenger()->addStatus($this->t('There is still work to be done to unpublish, but we made it here.'));
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment