public function actionSaveSorted() { if (Yii::$app->request->isPost === false || !isset($_POST['ids'], $_POST['filterSets'])) { throw new BadRequestHttpException(); } Yii::$app->response->format = Response::FORMAT_JSON; $ids = (array) $_POST['ids']; if ($_POST['filterSets'] === '1') { $result = FilterSets::sortModels($ids); $this->invalidateTags(FilterSets::className(), $ids); } else { $result = PropertyStaticValues::sortModels($ids); $this->invalidateTags(PropertyStaticValues::className(), $ids); $this->invalidateTags(FilterSets::className(), []); } return $result; }