本文整理汇总了PHP中Task::updateStatus方法的典型用法代码示例。如果您正苦于以下问题:PHP Task::updateStatus方法的具体用法?PHP Task::updateStatus怎么用?PHP Task::updateStatus使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Task
的用法示例。
在下文中一共展示了Task::updateStatus方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: handleRequest
protected function handleRequest(array $request)
{
$version = $request[self::FIELD_PROTOCOL_VERSION];
$projectTitle = $request[self::FIELD_TITLE];
$projectDescription = $request[self::FIELD_DESCRIPTION];
$projectId = Project::create(Project::getNextOrd(), $projectTitle, $projectDescription);
$listsRep = $request[self::FIELD_LISTS];
$listOrd = 0;
foreach ($listsRep as $listRep) {
$listTitle = $listRep[self::FIELD_TITLE];
$listId = TasksList::create($projectId, ++$listOrd, $listTitle);
$tasksRep = $listRep[self::FIELD_TASKS];
$taskOrd = 0;
foreach ($tasksRep as $taskRep) {
$taskTitle = $taskRep[self::FIELD_TITLE];
$taskDescription = $taskRep[self::FIELD_DESCRIPTION];
$taskId = Task::create($listId, ++$taskOrd, $taskTitle, $taskDescription);
if ($version > 1) {
$taskStatus = $taskRep[self::FIELD_TASK_STATUS];
Task::updateStatus($taskId, $taskStatus);
}
}
}
return array(self::FIELD_PROJECT_ID => $projectId);
}
示例2: handleRequest
protected function handleRequest(array $request)
{
$taskId = $request[self::FIELD_TASK_ID];
$status = $request[self::FIELD_TASK_STATUS];
Task::updateStatus($taskId, $status);
}
示例3: foreach
foreach ($archive->Lane->Cards as $card) {
if (!in_array($card->ExternalCardID, $external_task_id)) {
array_push($external_task_id, $card->ExternalCardID);
if ($card->ExternalCardID) {
//getting the idtask from project_task table by sending idproject_task(ExternalCardID)
$do_project_task = new ProjectTask();
$idtask = $do_project_task->getTaskId($card->ExternalCardID);
$do_project_task->free();
echo '<br>' . $card->ExternalCardID;
//Close the task (update the status to 'closed')
if ($idtask) {
$do_task = new Task();
$status = $do_task->getStatus($idtask);
echo $status . ":";
if ($status != 'closed') {
$do_task->updateStatus($idtask, "closed");
}
$do_task->free();
}
}
}
}
}
}
}
// }//added for testing
}
}
}
}
}
示例4: eventCloseTaskMultiple
/**
* Event Method to close multiple task
*/
function eventCloseTaskMultiple(EventControler $evctl)
{
$task_ids = $evctl->ck;
if (is_array($task_ids) && count($task_ids) > 0) {
$do_task = new Task();
foreach ($task_ids as $idtask) {
$do_task->updateStatus($idtask, "closed");
}
}
}