public function update() { $vChildren = new Valid_UInt('children'); $vChildren->required(); if ($this->request->validArray($vChildren)) { $this->dao->updateChildren($this->tracker->getId(), $this->request->get('children')); } else { if ($this->request->exist('children')) { $GLOBALS['Response']->addFeedback('error', $GLOBALS['Language']->getText('plugin_tracker_hierarchy', 'controller_bad_request')); } else { $this->dao->deleteAllChildren($this->tracker->getId()); } } $this->redirect(array('tracker' => $this->tracker->getId(), 'func' => 'admin-hierarchy')); }
/** * @return Array of Tracker */ public function getPossibleChildren(Tracker_Hierarchy_HierarchicalTracker $tracker) { $project_trackers = $this->getProjectTrackers($tracker->getProject()); $ids_to_remove = $this->dao->searchAncestorIds($tracker->getId()); $ids_to_remove[] = $tracker->getId(); $project_trackers = $this->removeIdsFromTrackerList($project_trackers, $ids_to_remove); return $project_trackers; }
/** * * @param array $mapping the id of tracker's children */ public function updateFromXmlProjectImportProcess(array $mapping) { $this->dao->updateChildren($this->tracker->getId(), $mapping); }
public function getTrackerId() { return $this->tracker->getId(); }