public function executeMovie($request) { $this->form = new MovieForm(MoviePeer::retrieveByPk($request->getParameter('id'))); if ($request->isMethod(sfRequest::POST)) { $this->form->bind($request->getParameter('movie')); if ($this->form->isValid()) { $movie = $this->form->save(); $this->redirect('i18n/movie?id=' . $movie->getId()); } } }
/** * Get the associated Movie object * * @param PropelPDO Optional Connection object. * @return Movie The associated Movie object. * @throws PropelException */ public function getMovie(PropelPDO $con = null) { if ($this->aMovie === null && $this->id !== null) { $this->aMovie = MoviePeer::retrieveByPk($this->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->aMovie->addMovieI18ns($this); */ } return $this->aMovie; }