本文整理匯總了PHP中CTask::deepMove方法的典型用法代碼示例。如果您正苦於以下問題:PHP CTask::deepMove方法的具體用法?PHP CTask::deepMove怎麽用?PHP CTask::deepMove使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類CTask
的用法示例。
在下文中一共展示了CTask::deepMove方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: deepMove
function deepMove($destProject_id = 0, $destTask_id = 0)
{
$children = $this->getChildren();
$this->move($destProject_id, $destTask_id);
if (!empty($children)) {
foreach ($children as $child) {
$tempChild = new CTask();
$tempChild->peek($child);
$tempChild->htmlDecode($child);
$tempChild->deepMove($destProject_id, $this->task_id);
$tempChild->store();
}
}
$this->store();
}
示例2:
$t->delete();
//Now task deletion deletes children no matter what.
/*
//delete children
if (isset($children)) {
foreach($children as $child) {
$t->load($child);
$t->delete();
}
}
*/
} else {
if ($action == 'm') {
//move task
if (isset($children)) {
$t->deepMove($new_project, $new_task);
} else {
$t->move($new_project, $new_task);
}
$t->store();
} else {
if ($action == 'c') {
//copy task
if (isset($children)) {
$t2 = $t->deepCopy($new_project, $new_task);
} else {
$t2 = $t->copy($new_project, $new_task);
}
$t2->store();
} else {
if ($action > -2 && $action < 2) {