Example #1
0
 /**
  * Выводит список форумов
  *
  * @return void
  */
 public function actionIndex()
 {
     $forums = new Forum('search');
     $forums->unsetAttributes();
     $forums->parent_id = [NULL];
     $forums->status = Forum::STATUS_OPEN;
     $this->render('index', ['forums' => $forums]);
 }
 /**
  * Manages all models.
  */
 public function actionAdmin()
 {
     $model = new Forum('search');
     $model->unsetAttributes();
     // clear any default values
     if (isset($_GET['Forum'])) {
         $model->attributes = $_GET['Forum'];
     }
     $this->render('admin', array('model' => $model));
 }
 /**
  * Управление форумами.
  *
  * @return void
  */
 public function actionIndex()
 {
     $model = new Forum('search');
     $model->unsetAttributes();
     if (!is_null(Yii::app()->getRequest()->getQuery('Forum'))) {
         $model->attributes = Yii::app()->getRequest()->getQuery('Forum');
     }
     $this->render('index', ['model' => $model]);
 }
Example #4
0
 public function getForums()
 {
     $forums = new Forum('search');
     $forums->unsetAttributes();
     $forums->parent_id = $this->id;
     $forums->status = Forum::STATUS_OPEN;
     return $forums;
 }