public function actionAdmin() { $model = new VtdcTruckDoc('search'); $scopes = $model->scopes(); if (isset($scopes[$this->scope])) { $model->{$this->scope}(); } $model->unsetAttributes(); if (isset($_GET['VtdcTruckDoc'])) { $model->attributes = $_GET['VtdcTruckDoc']; } $this->render('admin', array('model' => $model)); }