Example #1
0
 /**
  * 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 Service";
     $model = new Service('search');
     $model->unsetAttributes();
     if (isset($_GET['Service'])) {
         $model->attributes = $_GET['Service'];
     }
     $this->render($this->view . 'index', array('model' => $model));
 }
 /**
  * Manages all models.
  */
 public function actionAdmin()
 {
     $model = new Service('search');
     $model->unsetAttributes();
     // clear any default values
     if (isset($_GET['Service'])) {
         $model->attributes = $_GET['Service'];
     }
     $this->render('admin', array('model' => $model));
 }
Example #3
0
 /**
  * Manages all models.
  */
 public function actionAdmin()
 {
     if (isset($_GET['pageSize'])) {
         Yii::app()->user->setState('pageSize', (int) $_GET['pageSize']);
         unset($_GET['pageSize']);
         // would interfere with pager and repetitive page size change
     }
     $model = new Service('search');
     $model->unsetAttributes();
     // clear any default values
     $model->serviceType = new ServiceType('search');
     $model->serviceType->unsetAttributes();
     if (isset($_GET['ServiceType'])) {
         $model->serviceType->attributes = $_GET['ServiceType'];
     }
     if (isset($_GET['Service'])) {
         $model->attributes = $_GET['Service'];
     }
     $this->render('admin', array('model' => $model));
 }