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