/** * This is the default 'view' action that is invoked * when an action is not explicitly requested by users. */ public function actionIndex() { $Organisation = new Organisation('search'); $Organisation->unsetAttributes(); // clear any default values //for grid search if (isset($_GET['Organisation'])) { $Organisation->attributes = $_GET['Organisation']; } $this->pageTitle = 'Organisations | ' . Yii::app()->name; $this->breadcrumbs = array('Organisations'); $this->render('index', array('Organisation' => $Organisation)); }
/** * Manages all models. */ public function actionAdmin() { $model = new Organisation('search'); $model->unsetAttributes(); // clear any default values if (isset($_GET['Organisation'])) { $model->attributes = $_GET['Organisation']; } $this->render('admin', array('model' => $model)); }