/** * Finds the DctProgress model based on its primary key value. * If the model is not found, a 404 HTTP exception will be thrown. * @param integer $id * @return DctProgress the loaded model * @throws NotFoundHttpException if the model cannot be found */ protected function findModel($id) { $model = DctProgress::find()->with('dctProgressLocs')->where(['dct_progress_id' => $id])->one(); if ($model !== null) { return $model; } else { throw new NotFoundHttpException('The requested page does not exist.'); } }
/** * Finds the DctProgress model based on its primary key value. * If the model is not found, a 404 HTTP exception will be thrown. * @param integer $id * @return DctProgress the loaded model * @throws NotFoundHttpException if the model cannot be found */ protected function findModel($id) { if (($model = DctProgress::findOne($id)) !== null) { return $model; } else { throw new NotFoundHttpException('The requested page does not exist.'); } }
/** * @return \yii\db\ActiveQuery */ public function getDctProgress() { return $this->hasOne(DctProgress::className(), ['dct_progress_id' => 'dct_progress_id']); }