Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save superbiche/f50378d52d267c78795228ae6f393e4e to your computer and use it in GitHub Desktop.
Save superbiche/f50378d52d267c78795228ae6f393e4e to your computer and use it in GitHub Desktop.
diff --git a/src/SchedulerManager.php b/src/SchedulerManager.php
index de17b18..69bcad6 100644
--- a/src/SchedulerManager.php
+++ b/src/SchedulerManager.php
@@ -207,6 +207,9 @@ class SchedulerManager {
$event->getNode()->save();
$result = TRUE;
+ $node->setPublished(NODE_PUBLISHED);
+ $node->moderation_state->value = 'published';
+ $node->save();
}
}
@@ -356,6 +359,9 @@ class SchedulerManager {
$event->getNode()->save();
$result = TRUE;
+ $node->setPublished(NODE_NOT_PUBLISHED);
+ $node->moderation_state->value = 'archived';
+ $node->save();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment