Пример #1
0
 /**
  * Finds the MstMaterialconversion model based on its primary key value.
  * If the model is not found, a 404 HTTP exception will be thrown.
  * @param string $id
  * @return MstMaterialconversion the loaded model
  * @throws NotFoundHttpException if the model cannot be found
  */
 public function findMaterialConversionModel($id)
 {
     if (($model = MstMaterialConversion::findOne($id)) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('The requested page does not exist.');
     }
 }
Пример #2
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getMstMaterialConversion()
 {
     return $this->hasOne(MstMaterialConversion::className(), ['material_code' => 'item_code']);
 }