예제 #1
0
 public function executeRemovePhotographer(sfWebRequest $request)
 {
     $obj = json_decode($request->getParameter("obj"), true);
     $job = JobPeer::retrieveByPK($obj["viewingJobId"]);
     $photographer = PhotographerPeer::retrieveByPK($obj["photographerId"]);
     if (!is_null($job) && !is_null($photographer)) {
         $job->removePhotographer($photographer);
     }
     $this->renderPartial("photographerList", array("job" => $job));
     return sfView::NONE;
 }
예제 #2
0
 public function executeEdit(sfWebRequest $request)
 {
     $photographer = PhotographerPeer::retrieveByPK($request->getParameter("photographer_id"));
     $updating = $request->getParameter("form");
     switch ($updating) {
         case "info":
             $form = new InfoPhotographerForm($photographer);
             $this->bindAndValidateForm($form, $request);
             $this->renderPartial("Info", array("photographer" => $photographer, "InfoForm" => $form));
             break;
         default:
             break;
     }
     return sfView::NONE;
 }