Exemple #1
0
 public function executeAjaxAccept()
 {
     // TODO: Secure
     $application = PositionApplicationPeer::retrieveByUuid($this->getRequestParameter('application'));
     $this->forward404Unless($application, 'ProjectApplication not found, unable to accept applicant');
     $position = $application->getProjectPosition();
     $project = $position->getProject();
     $this->forward404Unless($project, 'Project not found, unable to accept applicant');
     $this->logMessage('App_UUID: [' . $this->getRequestParameter('application') . '], App_ID: [' . $application->getId() . '], app_dump: ' . print_r($application, true));
     if ($project->acceptApplicant($application->getId()) == false) {
         $this->forward404('Unable to add position, error.');
     }
     $this->setTemplate('applicationViewer');
     $this->application = $application;
 }