public function executeAddConcernForm(sfWebRequest $request) { $this->forward404unless($request->isXmlHttpRequest()); $number = intval($request->getParameter("num")); if ($note_entry = NoteEntryPeer::retrieveByPk($request->getParameter('id'))) { $form = new NoteEntryForm($note_entry); } else { $entry = new NoteEntry(); $entry->setEmployee($this->getUser()->getProfile()->getEmployee()); $form = new NoteEntryForm($entry); } $form->addConcern($number); return $this->renderPartial('AddConcern', array('form' => $form, 'num' => $number)); }