/** * @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; }
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')); }
private function getTrackersNotInHierachy() { $trackers_not_in_hierarchy = array(); EventManager::instance()->processEvent(TRACKER_EVENT_TRACKERS_CANNOT_USE_IN_HIERARCHY, array('project' => $this->tracker->getProject(), 'result' => &$trackers_not_in_hierarchy)); return $trackers_not_in_hierarchy; }
private function getTrackersNotInHierachy() { $trackers_not_in_hierarchy = array(); EventManager::instance()->processEvent(TRACKER_EVENT_TRACKERS_CANNOT_USE_IN_HIERARCHY, array('tracker' => $this->tracker->getUnhierarchizedTracker(), 'user' => $this->request->getCurrentUser(), 'result' => &$trackers_not_in_hierarchy)); return $trackers_not_in_hierarchy; }
private function getSelectedAttribute(Tracker $possible_child) { if ($this->tracker->hasChild($possible_child)) { return 'selected="selected"'; } }