Пример #1
0
 /**
  * Gets the hierarchy to this project
  */
 public function getHierarchy()
 {
     $hierarchy = array();
     if ($this->parentid) {
         $parent = $this->projectService->getProject($this->parentid);
         $hierarchy = $parent->getHierarchy();
         $hierarchy[] = $parent;
     } else {
         $client = $this->clientService->getClient($this->clientid);
         $hierarchy[] = $client;
     }
     return $hierarchy;
 }