public function actionTrash($id = NULL) { $model = new StaticHtml('search'); $model->unsetAttributes(); // clear any default values if (isset($_GET['StaticHtml'])) { $model->attributes = $_GET['StaticHtml']; } if (isset($id)) { $model = $this->loadModel($id); $model->status = 1; if ($model->save(true, array('status'))) { Yii::app()->user->setFlash('success', Yii::t('staticHtml', 'HTML was re-activate.')); } else { Yii::app()->user->setFlash('error', Yii::t('staticHtml', 'HTML cannot re-activate. Please try it later.')); } $this->redirect(array('/' . backend . '/staticHtml/trash')); } $this->render(strtolower($this->action->Id), array('model' => $model)); }