Beispiel #1
0
 /**
  * @param $id
  * @return \yii\web\Response
  * @throws NotFoundHttpException
  * @throws \Exception
  */
 public function actionDelete($id)
 {
     /** @var OrderData $model */
     $model = OrderData::findOne($id);
     if (!$model) {
         throw new NotFoundHttpException();
     }
     $model->delete();
     return $this->redirect(['list', 'node' => $model->order_id]);
 }
Beispiel #2
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getOrderLines()
 {
     return $this->hasMany(OrderData::className(), ['order_id' => 'id']);
 }