src/TaskManager.php
public static function editTask($task, $time, $command, $status = TaskInterface::TASK_STATUS_ACTIVE, $comment = null)
    {
        if (!$validated_command = self::validateCommand($command)) {
            return $task;
        }
        $task->setStatus($status);
        $task->setCommand($validated_command);
        $task->setTime($time);
        if (isset($comment)) {
            $task->setComment($comment);
        }

        $task->setTsUpdated(date('Y-m-d H:i:s'));

        $task->taskSave();
        return $task;
    }
public static function editTask($task, $time, $command, $status = TaskInterface::TASK_STATUS_ACTIVE, $comment = null)
    {
        if (!$validated_command = self::validateCommand($command)) {
            return $task;
        }
        $task->setStatus($status);
        $task->setCommand($validated_command);
        $task->setTime($time);
        if (isset($comment)) {
            $task->setComment($comment);
        }

        $task->setTsUpdated(date('Y-m-d H:i:s'));

        $task->taskSave();
        return $task;
    }
public static function editTask ( $ task , $ time , $ command , $ status = TaskInterface :: TASK_STATUS_ACTIVE , $ comment = null ) { if ( ! $ validated_command = self :: validateCommand ( $ command ) ) { return $ task ; } $ task -> setStatus ( $ status ) ; $ task -> setCommand ( $ validated_command ) ; $ task -> setTime ( $ time ) ; if ( isset ( $ comment ) ) { $ task -> setComment ( $ comment ) ; } $ task -> setTsUpdated ( date ( 'Y-m-d H:i:s' ) ) ; $ task -> taskSave ( ) ; return $ task ; }
Edit and save TaskInterface object
@param TaskInterface $task
@param string $time
@param string $command
@param string $status
@param string $comment
@return TaskInterface
Edit and save TaskInterface object