Ejemplo n.º 1
0
 public function retrieveTree(C3op_Projects_Project $project, C3op_Projects_ProjectMapper $projectMapper, C3op_Projects_ActionMapper $actionMapper)
 {
     $mainActions = $projectMapper->getAllActionsSubordinatedTo($project);
     $projectTree = array();
     foreach ($mainActions as $actionId) {
         $loopAction = $actionMapper->findById($actionId);
         $obj = new C3op_Projects_ActionTree();
         $actionTree = $obj->retrieveTree($loopAction, $actionMapper);
         $projectTree[$actionId] = $actionTree;
     }
     // get all subordinated actions
     return $projectTree;
 }
Ejemplo n.º 2
0
 public function treeAction()
 {
     $this->initActionMapper();
     $action = $this->initActionWithCheckedId($this->actionMapper);
     $objTree = new C3op_Projects_ActionTree();
     $tree = $objTree->retrieveTree($action, $this->actionMapper);
     $this->treeData = array();
     $this->fillDataTree($tree);
     $this->view->actionTree = $tree;
     $this->view->treeData = $this->treeData;
 }