Esempio n. 1
0
 public function getProjects()
 {
     sfContext::getInstance()->getLogger()->info('Filtering user positions for projects...');
     $positions = $this->getPositionsUser();
     $projects = array();
     foreach ($positions as $position) {
         $projects[] = $position->getProjectPosition()->getProject();
     }
     foreach (ProjectPeer::retrieveByUserId($this->getUserId()) as $project) {
         $projects[] = $project;
     }
     foreach ($projects as $key => $value) {
         if ($projects[$key] == null) {
             unset($projects[$key]);
         }
     }
     return array_unique($projects);
 }