public function actionTogglePublishPage($id, $sector) { $model = ContentPage::findOne($id); $model->is_published = !$model->is_published; $model->save(false); return $this->redirect(['/' . $this->id, 'sector' => $sector, 'caller' => $model->type->name]); }