public function executeDelete() { $photo = sfPhotoGalleryPeer::retrieveByPk($this->getRequestParameter('id')); $this->forward404Unless($photo); $photo->delete(); return $this->redirect('photo/list'); }