コード例 #1
0
ファイル: ProjectTree.php プロジェクト: racporto/c3op
 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;
 }
コード例 #2
0
ファイル: ActionController.php プロジェクト: racporto/c3op
 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;
 }