public function actionIndex()
 {
     $model = new Competition();
     $model->unsetAttributes();
     $model->attributes = $this->aRequest('Competition');
     $this->render('index', array('model' => $model));
 }
 public function actionIndex()
 {
     $model = new Competition('search');
     $model->unsetAttributes();
     $model->year = $this->sGet('year', 'current');
     $model->type = $this->sGet('type', '');
     $model->province = $this->sGet('province', '');
     $model->event = $this->sGet('event', '');
     $model->status = Competition::STATUS_SHOW;
     $this->title = 'Competition List';
     $this->pageTitle = array('Competition List');
     $this->appendKeywords('Competition List');
     $this->breadcrumbs = array('Competitions');
     $this->render('index', array('model' => $model));
 }
Пример #3
0
 /**
  * Manages all models.
  */
 public function actionAdmin()
 {
     if ($this->CanAccess("admin")) {
         $model = new Competition('search');
         $model->unsetAttributes();
         // clear any default values
         if (isset($_GET['Competition'])) {
             $model->attributes = $_GET['Competition'];
         }
         $this->render('admin', array('model' => $model));
     } else {
         throw new CHttpException(405, Yii::t('app', 'You do not have permissions to access this page.'));
     }
 }