Example #1
0
 /**
  * Manages all models.
  */
 public function actionAdmin()
 {
     $model = new Session('search');
     $model->unsetAttributes();
     // clear any default values
     if (isset($_GET['Session'])) {
         $model->attributes = $_GET['Session'];
     }
     $this->render('admin', array('model' => $model));
 }
 /**
  * Manages all models.
  */
 public function actionAdmin()
 {
     $answerTypeAll = AnswerType::model()->findAll();
     $answerTypeOption = array();
     foreach ($answerTypeAll as $answerType) {
         $answerTypeOption[$answerType->answer_type_id] = $answerType->answer_type_name;
     }
     $model = new Session('search');
     $model->unsetAttributes();
     // clear any default values
     if (isset($_GET['Session'])) {
         $model->attributes = $_GET['Session'];
     }
     $this->render('admin', array('model' => $model, 'answerTypeOption' => $answerTypeOption));
 }