public function actionRemoveCategory($id) { $category = FaqCategory::findByPk($id); if (empty($category)) { throw new ServerErrorHttpException('Remove category failed!'); } $category['isDeleted'] = true; $accountId = $category->_id . ''; $category->save(); $this->_assignToDefault($accountId); return 'ok'; }