/** * Manages all models. */ public function actionIndex() { $model = new MainTabel('search'); $model->attachBehavior('dateComparator', array('class' => 'DateComparator')); $model->unsetAttributes(); // clear any default values // set attributes from get if (isset($_GET['MainTabel'])) { $model->attributes = $_GET['MainTabel']; } $this->render('list', array('model' => $model)); }