/** * Manages all models. */ public function actionIndex() { $model = new Posts('search'); $model->unsetAttributes(); // clear any default values if (isset($_GET['Posts'])) { $model->attributes = $_GET['Posts']; } $this->render('index', array('model' => $model, 'actions' => $this->listActionsCanAccess)); }
/** * Manages all models. */ public function actionAdmin() { $model = new Posts('search'); $model->unsetAttributes(); // clear any default values if (isset($_GET['Posts'])) { $model->attributes = $_GET['Posts']; } $this->render('admin', array('model' => $model)); }