public function executeUpdatePreceptors(sfWebRequest $request) { $this->head_personal = PersonalPeer::retrieveByPk($request->getParameter('head_personal_personal[id]')); if (null === $this->head_personal) { $this->getUser()->setFlash('error', 'Debe seleccionar un jefe de preceptores para configurar sus preceptores'); $this->redirect('@head_personal'); } $this->form = new HeadPersonalPersonalManyForm($this->head_personal); $this->form->bind($request->getParameter($this->form->getName()), $request->getFiles($this->form->getName())); if ($this->form->isValid()) { $this->form->save(); $this->getUser()->setFlash('notice', 'Los preceptores seleccionados han sido correctamente asignado al jefe de preceptores.'); } else { $this->setProcessFormErrorFlash(); } $this->setTemplate('preceptors'); }
public function executeDelete() { $personal = PersonalPeer::retrieveByPk($this->getRequestParameter('id')); $this->forward404Unless($personal); $personal->delete(); return $this->redirect('personal/list'); }