public function executeDelete(sfWebRequest $request) { $request->checkCSRFProtection(); $this->forward404Unless($Pregunta = PreguntasPeer::retrieveByPk($request->getParameter('id')), sprintf('Object Pregunta does not exist (%s).', $request->getParameter('id'))); $Pregunta->delete(); $this->redirect('preguntas/index'); }
/** * Get the associated Preguntas object * * @param PropelPDO Optional Connection object. * @return Preguntas The associated Preguntas object. * @throws PropelException */ public function getPreguntas(PropelPDO $con = null) { if ($this->aPreguntas === null && $this->preguntas_id !== null) { $this->aPreguntas = PreguntasPeer::retrieveByPk($this->preguntas_id); /* The following can be used additionally to guarantee the related object contains a reference to this object. This level of coupling may, however, be undesirable since it could result in an only partially populated collection in the referenced object. $this->aPreguntas->addResultadosparcialess($this); */ } return $this->aPreguntas; }