예제 #1
0
 /**
  * @param int $id
  */
 public function actionCreate($id = 0)
 {
     if ($id != 0) {
         $oConf = Conference::findOne($id);
         if ($oConf === null) {
             $id = 0;
         }
     }
     if ($id == 0) {
         return $this->render('//doclad/select_conference', ['link' => ['cabinet/create', 'id' => 0], 'partial' => false]);
     } else {
         $this->conferenceId = $oConf->cnf_id;
         return parent::addDoclad();
     }
 }
예제 #2
0
 /**
  * Finds the Conference model based on its primary key value.
  * If the model is not found, a 404 HTTP exception will be thrown.
  * @param integer $id
  * @return Conference the loaded model
  * @throws NotFoundHttpException if the model cannot be found
  */
 protected function findModel($id)
 {
     if (($model = Conference::findOne($id)) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('The requested page does not exist.');
     }
 }
예제 #3
0
 /**
  * Finds the Conference model based on its primary key value.
  * If the model is not found, a 404 HTTP exception will be thrown.
  * @return Conference the loaded model
  * @throws NotFoundHttpException if the model cannot be found
  */
 public function findConferenceModel()
 {
     if ($this->conferenceId !== null && ($model = Conference::findOne($this->conferenceId)) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('Не найдена информация о конференции');
     }
 }