本文整理汇总了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) {