Example #1
0
 /**
  * Executes createSaveDescription action
  *
  */
 public function executeCreateSaveDescription()
 {
     if ($this->getRequest()->getMethod() == sfRequest::POST) {
         $this->logMessage('Checking to see if project exists...');
         $projectApplication = ProjectApplicationPeer::retrieveByUuid($this->getRequestParameter('id'));
         //$this->forward404Unless($projectApplication != null, 'Project not found using uuid ['.$this->getRequestParameter('id').']');
         if ($projectApplication == null) {
             $this->logMessage('Project not found using uuid of [' . $this->getRequestParameter('id') . ']');
             $projectApplication = new ProjectApplication();
             $projectApplication->setStatus(sfConfig::get('app_project_application_status_unapproved'));
         }
         //todo: add tag support
         $projectApplication->setDepartmentId($this->getRequestParameter('department_id'));
         $projectApplication->setTitle($this->getRequestParameter('title'));
         $projectApplication->setDescription($this->getRequestParameter('description'));
         $projectApplication->setNotes($this->getRequestParameter('notes'));
         $projectApplication->setCampusId($this->getRequestParameter('campus'));
         $projectApplication->setCommunityBenefits($this->getRequestParameter('community_benefits'));
         $projectApplication->setStudentReasons($this->getRequestParameter('student_reasons'));
         $projectApplication->setOwnerId($this->getUser()->getId());
         $projectApplication->setPage1Complete(true);
         $projectApplication->save();
         $projectApplication = ProjectApplicationPeer::retrieveByPk($projectApplication->getId());
         $this->setFlash('id', $projectApplication->getUuid());
         //echo $this->getController()->genUrl('@create_project_step2?id='.$projectApplication->getUuid(), true);
         $this->redirect('@create_project_step2?id=' . $projectApplication->getUuid());
     }
     $this->forward404('not a post request, something is strange');
 }
Example #2
0
 public function addProjectApplication(ProjectApplication $l)
 {
     $this->collProjectApplications[] = $l;
     $l->setDepartment($this);
 }
Example #3
0
 public function addProjectApplicationRelatedByOwnerId(ProjectApplication $l)
 {
     $this->collProjectApplicationsRelatedByOwnerId[] = $l;
     $l->setsfGuardUserRelatedByOwnerId($this);
 }
Example #4
0
 public function addProjectApplication(ProjectApplication $l)
 {
     $this->collProjectApplications[] = $l;
     $l->setCampus($this);
 }