Exemplo n.º 1
0
 /**
  * Returns an array of projects related to person helped
  * 
  * @return array Persons_Model_PersonHelpedProject
  */
 public function getProjects()
 {
     if (count($this->projects) == 0) {
         $pd = new Persons_Domain_PersonHelped();
         $this->projects = $pd->getProjects($this->getId());
     }
     return $this->projects;
 }
 public function listProjectsRelatedAction()
 {
     if ($this->_isUserAllowed(null, null)) {
         if ($this->_hasParam('id') || $this->_hasParam('person')) {
             $id = $this->_hasParam('id') ? $this->_getParam('id') : $this->_getParam('person');
             $domain = new Persons_Domain_PersonHelped();
             $projects = $domain->getProjects($id);
             $this->view->projects = $projects;
         }
     }
 }