예제 #1
0
 public function executeApplyForm()
 {
     $this->forward404Unless($this->position = ProjectPositionPeer::retrieveByUuid($this->getRequestParameter('position')));
     $this->project = $this->position->getProject();
     // If the application was submitted
     if ($this->getRequest()->getMethod() == sfRequest::POST) {
         if (!$this->position->isApplicant($this->getUser()->getId())) {
             $application = new PositionApplication();
             $application->setInterest($this->getRequestParameter('interest'));
             $application->setQualification($this->getRequestParameter('qualification'));
             $application->setNotes($this->getRequestParameter('notes'));
             $application->setStatus(sfConfig::get('app_position_application_status_pending'));
             $application->setPositionId($this->position->getId());
             $application->setUserId($this->getUser()->getId());
             $application->save();
             $this->project->handleNewApplicant($this->position->getId(), $this->getUser()->getId());
         }
         $this->setTemplate('apply');
         return sfView::SUCCESS;
     }
     $this->application = new PositionApplication();
 }
예제 #2
0
 public function addPositionApplication(PositionApplication $l)
 {
     $this->collPositionApplications[] = $l;
     $l->setProjectPosition($this);
 }
예제 #3
0
 public function addPositionApplication(PositionApplication $l)
 {
     $this->collPositionApplications[] = $l;
     $l->setsfGuardUser($this);
 }