Exemplo n.º 1
0
 public function actionIndex()
 {
     $model = new Faq();
     $model->unsetAttributes();
     $model->attributes = $this->aRequest('Faq');
     $this->render('index', array('model' => $model));
 }
Exemplo n.º 2
0
 /**
  * Manages all models.
  */
 public function actionAdmin()
 {
     $model = new Faq('search');
     $model->unsetAttributes();
     // clear any default values
     if (isset($_GET['Faq'])) {
         $model->attributes = $_GET['Faq'];
     }
     $this->render('admin', array('model' => $model));
 }
Exemplo n.º 3
0
 public function actionIndex()
 {
     $categoryId = $this->iGet('category_id', 1);
     $model = new Faq();
     $model->unsetAttributes();
     $model->category_id = $categoryId;
     $model->status = Faq::STATUS_SHOW;
     $categories = FaqCategory::getCategoryMenu();
     $this->title = Yii::t('common', 'Frequently Asked Questions');
     $this->pageTitle = array($this->title);
     if ($model->category) {
         $this->pageTitle = array($this->title, $model->category->getAttributeValue('name'));
     }
     $this->breadcrumbs = array('FAQ');
     $this->render('index', array('model' => $model, 'categories' => $categories));
 }