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