with($optionsSearch['with']) ->innerJoinWith($optionsSearch['join_with'], true) ->where(['product.id_producer' => GlobalParam::getCurrentProducerId()]) ->orderBy('product_price.price ASC') ; $dataProvider = new ActiveDataProvider([ 'query' => $query, 'sort' => false, 'pagination' => [ 'pageSize' => 1000, ], ]); $this->load($params); if (!$this->validate()) { return $dataProvider; } //$query->andFilterWhere(['like', 'user.name', $this->id_user]) ; //$query->andFilterWhere(['like', 'point_sale.name', $this->id_point_sale]) ; return $dataProvider; } }