Ejemplo n.º 1
0
 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'));
 }
 /**
  *
  * @param array $all_hierarchies
  *
  * Stores in database the hierarchy between created trackers
  */
 public function storeHierarchyInDB(array $all_hierarchies)
 {
     foreach ($all_hierarchies as $parent_id => $hierarchy) {
         $this->hierarchy_dao->updateChildren($parent_id, $hierarchy);
     }
 }
Ejemplo n.º 3
0
 /**
  *
  * @param array $mapping the id of tracker's children
  */
 public function updateFromXmlProjectImportProcess(array $mapping)
 {
     $this->dao->updateChildren($this->tracker->getId(), $mapping);
 }