コード例 #1
0
 private function processEnabled(Workflow $workflow, $switch_to_is_used)
 {
     $should_change_activation = (bool) $switch_to_is_used != (bool) $workflow->isUsed();
     if ($should_change_activation && $this->workflow_factory->updateActivation((int) $workflow->workflow_id, $switch_to_is_used)) {
         $feedback_key = 'workflow_' . ($switch_to_is_used ? 'enabled' : 'disabled');
         $GLOBALS['Response']->addFeedback('info', $GLOBALS['Language']->getText('workflow_admin', $feedback_key), CODENDI_PURIFIER_DISABLED);
     }
 }