Skip to content
Snippets Groups Projects

Feature/istwcms 4166 publish unpublish

Merged Eric Bremner requested to merge feature/ISTWCMS-4166-publish-unpublish into 8.x-1.x
1 file
+ 10
1
Compare changes
  • Side-by-side
  • Inline
@@ -80,8 +80,17 @@ class UwContentModerationForm extends ConfirmFormBase {
@@ -80,8 +80,17 @@ class UwContentModerationForm extends ConfirmFormBase {
*/
*/
public function submitForm(array &$form, FormStateInterface $form_state) {
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.
// 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.'));
}
}
/**
/**
Loading