public function actionSearch() { Yii::$app->response->format = Response::FORMAT_JSON; $productDto = new ProductDto(); $productDto->setScenario('user-query'); $ds = $this->productService->query($productDto, ['pageParam' => 'pageCurrent', 'pageSizeParam' => 'pageSize', 'defaultPageSize' => $this->pageParams['pageSize'], 'route' => Yii::$app->requestedRoute, 'params' => $this->pageParams], [$this->sortParams['orderField'] => $this->sortParams['orderDirection']]); return $ds; }