/** * Executes delete action * * @param sfWebRequest $request */ public function executeDelete(sfWebRequest $request) { $request->checkCSRFProtection(); $this->forward404Unless($state = StatePeer::retrieveByPk($request->getParameter('id')), sprintf('Object state does not exist (%s).', $request->getParameter('id'))); $state->delete(); $this->redirect('state/index'); }