/** * This is the default 'index' action that is invoked * when an action is not explicitly requested by users. */ public function actionIndex() { $this->pageTitle = "List of Type Service"; $model = new ServiceType('search'); $model->unsetAttributes(); if (isset($_GET['ServiceType'])) { $model->attributes = $_GET['ServiceType']; } $this->render($this->view . 'index', array('model' => $model)); }
/** * Manages all models. */ public function actionAdmin() { $model = new ServiceType('search'); $model->unsetAttributes(); // clear any default values if (isset($_GET['ServiceType'])) { $model->attributes = $_GET['ServiceType']; } $this->render('admin', array('model' => $model)); }