Ejemplo n.º 1
0
 public function getParentName()
 {
     $parent = JobPeer::retrieveByPK($this->getParent());
     if ($parent) {
         return $parent->toString();
     } else {
         return '-';
     }
 }
Ejemplo n.º 2
0
 public function executeAddJob(sfWebRequest $request)
 {
     $jobId = $request->getParameter("id");
     $job = JobPeer::retrieveByPK($jobId);
     $profile = $this->getUser()->getProfile();
     $to = "*****@*****.**";
     $subject = $profile->getFirstName() . " " . $profile->getLastName() . " is requestting to be added to job " . $job->getEvent();
     mail($to, $subject, $subject);
     JobPeer::addEmailLogMessage($jobId, "Request to be added", "*****@*****.**");
 }
Ejemplo n.º 3
0
 public function getJob($con = null)
 {
     include_once 'lib/model/om/BaseJobPeer.php';
     if ($this->aJob === null && $this->job_id !== null) {
         $this->aJob = JobPeer::retrieveByPK($this->job_id, $con);
     }
     return $this->aJob;
 }
Ejemplo n.º 4
0
 public function executeAttach(sfWebRequest $request)
 {
     $jobId = $request->getParameter("jobId");
     $job = JobPeer::retrieveByPK($jobId);
     $attachForm = new JobAttachmentFormCustom();
     $attachForm->bind($request->getParameter($attachForm->getName()), $request->getFiles($attachForm->getName()));
     $attachForm->setJobId($jobId);
     $attachForm->save();
     $this->redirect($this->generateUrl("job_show", array("slug" => $job->getSlug())));
 }
Ejemplo n.º 5
0
 public function getJobRelatedByParent($con = null)
 {
     include_once 'lib/model/om/BaseJobPeer.php';
     if ($this->aJobRelatedByParent === null && $this->parent !== null) {
         $this->aJobRelatedByParent = JobPeer::retrieveByPK($this->parent, $con);
     }
     return $this->aJobRelatedByParent;
 }