本文整理匯總了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");
}
}
}