public function executeDelete(sfWebRequest $request) { $request->checkCSRFProtection(); $this->forward404Unless($Aspirantes = AspirantesPeer::retrieveByPk($request->getParameter('id')), sprintf('Object Aspirantes does not exist (%s).', $request->getParameter('id'))); $Aspirantes->delete(); $this->redirect('aspirantes/index'); }
/** * Get the associated Aspirantes object * * @param PropelPDO Optional Connection object. * @return Aspirantes The associated Aspirantes object. * @throws PropelException */ public function getAspirantes(PropelPDO $con = null) { if ($this->aAspirantes === null && $this->aspirantes_id !== null) { $this->aAspirantes = AspirantesPeer::retrieveByPk($this->aspirantes_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->aAspirantes->addResultadoss($this); */ } return $this->aAspirantes; }
public function executeAgregarAspirante(sfWebRequest $request) { $this->forward404Unless($Evaluacion = EvaluacionesPeer::retrieveByPk($request->getParameter('id')), sprintf('Object Evaluacion does not exist (%s).', $request->getParameter('id'))); $this->forward404Unless($Aspirante = AspirantesPeer::retrieveByPk($request->getParameter('aspirantes_id')), sprintf('Object Aspirante does not exist (%s).', $request->getParameter('aspirantes_id'))); $Asistencia = new Asistencias(); $Asistencia->setEvaluaciones($Evaluacion); $Asistencia->setAspirantes($Aspirante); $Asistencia->save(); $this->redirect(url_for('evaluaciones/aspirantesAgregando?id=' . $Evaluacion->getId())); }