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