query->andWhere( [ 'variant_option_group_excl_id' => $group->id, ] ); $dataProvider->query->andFilterWhere( [ 'like', 'variant_option_excl_lang.value', $this->value, ] ); $dataProvider->sort = [ 'attributes' => [ 'id', 'value' => [ 'asc' => [ 'variant_option_excl_lang.value' => SORT_ASC ], 'desc' => [ 'variant_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 VariantOptionExcl::find(); } }