/** * Выводит список форумов * * @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]); }
public function getForums() { $forums = new Forum('search'); $forums->unsetAttributes(); $forums->parent_id = $this->id; $forums->status = Forum::STATUS_OPEN; return $forums; }