当前位置: 首页>>代码示例>>PHP>>正文


PHP CTask::moveTaskBetweenProjects方法代码示例

本文整理汇总了PHP中CTask::moveTaskBetweenProjects方法的典型用法代码示例。如果您正苦于以下问题:PHP CTask::moveTaskBetweenProjects方法的具体用法?PHP CTask::moveTaskBetweenProjects怎么用?PHP CTask::moveTaskBetweenProjects使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CTask的用法示例。


在下文中一共展示了CTask::moveTaskBetweenProjects方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: CTask

$comment = w2PgetParam($_POST, 'email_comment', '');
$new_task_project = (int) w2PgetParam($_POST, 'new_task_project', 0);
// Find the task if we are set
$task_end_date = null;
$obj = new CTask();
if ($task_id) {
    $obj->load($task_id);
    $task_end_date = new w2p_Utilities_Date($obj->task_end_date);
}
if (!$obj->bind($_POST)) {
    $AppUI->setMsg($obj->getError(), UI_MSG_ERROR);
    $AppUI->redirect('m=task&a=addedit');
}
// Check to see if the task_project has changed
if ($new_task_project != 0 and $obj->task_project != $new_task_project) {
    $obj->moveTaskBetweenProjects($task_id, $obj->task_project, $new_task_project);
    /**
     * We have to bail out for a redirect here or otherwise the store() below
     *   will screw things up and assign the root task specified back to the
     *   original project.
     */
    $AppUI->redirect('m=projects&a=view&project_id=' . $new_task_project);
}
// Map task_dynamic checkboxes to task_dynamic values for task dependencies.
if ($obj->task_dynamic != 1) {
    $task_dynamic_delay = w2PgetParam($_POST, 'task_dynamic_nodelay', '0');
    if (in_array($obj->task_dynamic, CTask::$tracking_dynamics)) {
        $obj->task_dynamic = $task_dynamic_delay ? 21 : 31;
    } else {
        $obj->task_dynamic = $task_dynamic_delay ? 11 : 0;
    }
开发者ID:illuminate3,项目名称:web2project,代码行数:31,代码来源:do_task_aed.php

示例2:

 //Action: Modify Duration
 if (isset($_POST['bulk_task_duration']) && $bulk_task_duration != '' && is_numeric($bulk_task_duration)) {
     if ($upd_task->task_id) {
         $upd_task->task_duration = $bulk_task_duration;
         //set duration type to hours (1)
         $upd_task->task_duration_type = $bulk_task_durntype ? $bulk_task_durntype : 1;
         $result = $upd_task->store();
         if (!$result) {
             break;
         }
     }
 }
 //Action: Move to Project
 if (isset($_POST['bulk_task_project']) && $bulk_task_project != '' && $bulk_task_project) {
     if ($upd_task->task_id) {
         $upd_task->moveTaskBetweenProjects($upd_task->task_id, $upd_task->task_project, $bulk_task_project);
     }
 }
 //Action: Change parent
 if ($bulk_task_parent) {
     $new_parent = -1 == $bulk_task_parent ? $upd_task->task_id : $bulk_task_parent;
     $upd_task->task_parent = $new_parent;
     $result = $upd_task->store();
 }
 //Action: Change dependency
 if (isset($_POST['bulk_task_dependency']) && $bulk_task_dependency != '') {
     if ($upd_task->task_id) {
         //If parent is self task
         if ($bulk_task_dependency == '0') {
             $upd_task->task_dynamic = 0;
             $upd_task->store();
开发者ID:illuminate3,项目名称:web2project,代码行数:31,代码来源:do_task_bulk_aed.php


注:本文中的CTask::moveTaskBetweenProjects方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。