query->andWhere( [ 'product_option_group_excl_id' => $group->id, ] ); $dataProvider->query->andFilterWhere( [ 'ilike', 'product_option_excl_lang.value', $this->value, ] ); $dataProvider->sort = [ 'attributes' => [ 'id', 'value' => [ 'asc' => [ 'product_option_excl_lang.value' => SORT_ASC ], 'desc' => [ 'product_option_excl_lang.value' => SORT_DESC ], ], 'created_at', 'is_filter', 'status', 'sort', ], ]; return $dataProvider; } /** * Return ActiveQuery for current model * * @return \yii\db\ActiveQuery */ protected function createQuery(): ActiveQuery { return ProductOptionExcl::find(); } }