-
-
Save hissy/04a46a1bab1f7286d71a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Concrete\Core\Workflow\Progress\PageProgress; | |
use Concrete\Core\Workflow\EmptyWorkflow; | |
Route::register('/clear_workflow_progress', function() { | |
$list = PageProgress::getPendingWorkflowProgressList(); | |
$r = $list->get(); | |
foreach ($r as $w) { | |
$wp = $w->getWorkflowProgressObject(); | |
$wo = $wp->getWorkflowObject(); | |
if ($wo instanceof EmptyWorkflow) { | |
$wp->delete(); | |
} | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment