示例#1
0
 /**
  * Finds the Producto model based on its primary key value.
  * If the model is not found, a 404 HTTP exception will be thrown.
  * @param integer $idProducto
  * @param integer $embalaje_idEmbalaje
  * @param integer $impuestos_idImpuesto
  * @return Producto the loaded model
  * @throws NotFoundHttpException if the model cannot be found
  */
 protected function findModel($idProducto, $embalaje_idEmbalaje, $impuestos_idImpuesto)
 {
     if (($model = Producto::findOne(['idProducto' => $idProducto, 'embalaje_idEmbalaje' => $embalaje_idEmbalaje, 'impuestos_idImpuesto' => $impuestos_idImpuesto])) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('The requested page does not exist.');
     }
 }
 /**
  * Finds the Producto model based on its primary key value.
  * If the model is not found, a 404 HTTP exception will be thrown.
  * @param integer $id
  * @return Producto the loaded model
  * @throws NotFoundHttpException if the model cannot be found
  */
 protected function findModel($id)
 {
     if (($model = Producto::findOne($id)) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('The requested page does not exist.');
     }
 }