/**
  * Delete this task lists
  *
  * @access public
  * @param boolean $delete_childs
  * @return boolean
  */
 function delete($delete_children = true)
 {
     if ($delete_children) {
         $children = $this->getSubTasks();
         foreach ($children as $child) {
             $child->delete(true);
         }
     }
     ProjectTaskDependencies::delete('( task_id = ' . $this->getId() . ' OR previous_task_id = ' . $this->getId() . ')');
     TemplateObjects::removeObjectFromTemplates($this);
     $task_list = $this->getParent();
     if ($task_list instanceof TemplateTask) {
         $task_list->detachTask($this);
     }
     return parent::delete();
 }
예제 #2
0
 /**
  * Removes this object from COTemplate objects
  *
  */
 function removeFromCOTemplates()
 {
     TemplateObjects::removeObjectFromTemplates($this);
 }