Exemplo n.º 1
0
 /**
  * Returns an array of social projects related to person helped
  * 
  * @return array Persons_Model_PersonHelpedSocialProject
  */
 public function getSocialProjects()
 {
     if (count($this->socialProjects) == 0) {
         $pd = new Persons_Domain_PersonHelped();
         $this->socialProjects = $pd->getSocialProjects($this->getId());
     }
     return $this->socialProjects;
 }
 public function listSocialProjectsAction()
 {
     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->getSocialProjects($id);
             $this->view->socialProjects = $projects;
         }
     }
 }