コード例 #1
0
ファイル: actions.class.php プロジェクト: cuongnv540/jobeet
 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());
         }
     }
 }
コード例 #2
0
ファイル: BaseMovieI18n.php プロジェクト: br00k/yavom
 /**
  * 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;
 }