本文整理匯總了PHP中CTask::shiftDependentTasks方法的典型用法代碼示例。如果您正苦於以下問題:PHP CTask::shiftDependentTasks方法的具體用法?PHP CTask::shiftDependentTasks怎麽用?PHP CTask::shiftDependentTasks使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類CTask
的用法示例。
在下文中一共展示了CTask::shiftDependentTasks方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: shiftDependentTasks
public function shiftDependentTasks()
{
// Get tasks that depend on this task
$csDeps = explode(',', $this->dependentTasks('', '', false));
if ($csDeps[0] == '') {
return;
}
// Stage 1: Update dependent task dates
foreach ($csDeps as $task_id) {
$this->update_dep_dates($task_id);
}
// Stage 2: Now shift the dependent tasks' dependents
foreach ($csDeps as $task_id) {
$newTask = new CTask();
$newTask->load($task_id);
$newTask->shiftDependentTasks();
}
return;
}
示例2: elseif
$q->setDelete('task_dependencies');
$q->addWhere('dependencies_task_id=' . $upd_task->task_id);
$q->exec();
} elseif (!($bulk_task_dependency == $upd_task->task_id)) {
$upd_task->task_dynamic = 31;
$upd_task->store($AppUI);
$q = new w2p_Database_Query();
$q->addTable('task_dependencies');
$q->addReplace('dependencies_task_id', $upd_task->task_id);
$q->addReplace('dependencies_req_task_id', $bulk_task_dependency);
$q->exec();
//Lets recalc the dependency
$dep_task = new CTask();
$dep_task->load($bulk_task_dependency);
if ($dep_task->task_id) {
$dep_task->shiftDependentTasks();
}
}
}
}
//Action: Modify priority
if (isset($_POST['bulk_task_priority']) && $bulk_task_priority != '') {
if ($upd_task->task_id) {
$upd_task->task_priority = $bulk_task_priority;
$result = $upd_task->store($AppUI);
if (is_array($result)) {
break;
}
}
}
//Action: Modify Access