/** * 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(); }
/** * Removes this object from COTemplate objects * */ function removeFromCOTemplates() { TemplateObjects::removeObjectFromTemplates($this); }