Пример #1
0
 public function api_order($id = null)
 {
     if ($id === null) {
         return $this->order;
     }
     $order = Order::findOne($id);
     return $order ? new OrderObject($order) : null;
 }
Пример #2
0
 public function actionDelete($id)
 {
     if ($model = Order::findOne($id)) {
         $model->delete();
     } else {
         $this->error = Yii::t('easyii', 'Not found');
     }
     return $this->formatResponse(Yii::t('easyii/shopcart', 'Order deleted'));
 }
Пример #3
0
 public function api_order($id)
 {
     $order = Order::findOne($id);
     return $order ? new OrderObject($order) : null;
 }