public function actionShowOrderList() {
        if (!\Yii::$app->user->isGuest) {
            $userOrders = \Yii::$app->cart->getAllUserOrders();
            $filterModel = new OrderSearch();
            $dataProvider = $filterModel->search(Yii::$app->request->get());

            return $this->render('order-list', [
                'userOrders' => $userOrders,
                'filterModel' => $filterModel,
                'dataProvider' => $dataProvider,
            ]);
        }
        else throw new NotFoundHttpException();
    }
public function actionShowOrderList() {
        if (!\Yii::$app->user->isGuest) {
            $userOrders = \Yii::$app->cart->getAllUserOrders();
            $filterModel = new OrderSearch();
            $dataProvider = $filterModel->search(Yii::$app->request->get());

            return $this->render('order-list', [
                'userOrders' => $userOrders,
                'filterModel' => $filterModel,
                'dataProvider' => $dataProvider,
            ]);
        }
        else throw new NotFoundHttpException();
    }
public function actionShowOrderList ( ) { if ( ! \ Yii :: $ app -> user -> isGuest ) { $ userOrders = \ Yii :: $ app -> cart -> getAllUserOrders ( ) ; $ filterModel = new OrderSearch ( ) ; $ dataProvider = $ filterModel -> search ( Yii :: $ app -> request -> get ( ) ) ; return $ this -> render ( 'order-list' , [ 'userOrders' => $ userOrders , 'filterModel' => $ filterModel , 'dataProvider' => $ dataProvider , ] ) ; } else throw new NotFoundHttpException ( ) ; }
Return list of user orders.

@return array Order
@throws NotFoundHttpException
Return list of user orders .