/** * Manages all models. */ public function actionAdmin() { $model = new Brand('search'); $model->unsetAttributes(); // clear any default values if (isset($_GET['Brand'])) { $model->attributes = $_GET['Brand']; } $this->render('admin', array('model' => $model)); }
public function actionIndex() { $model = new Brand('search'); $model->unsetAttributes(); // clear any default values if (isset($_GET['Brand'])) { $model->attributes = $_GET['Brand']; } $edit_model = new Brand(); $this->render('index', array('model' => $model, 'edit_model' => $edit_model)); }
/** * Manages all models. */ public function actionAdmin() { $model = new Brand('search'); $model->unsetAttributes(); // clear any default values if (isset($_GET['Brand'])) { $model->attributes = $_GET['Brand']; } if (isset($_GET['pageSize'])) { Yii::app()->user->setState('pageSize', (int) $_GET['pageSize']); unset($_GET['pageSize']); // would interfere with pager and repetitive page size change } $this->render('admin', array('model' => $model)); }