/** * Выводит список блогов * * @return void */ public function actionIndex() { $blogs = new Blog('search'); $blogs->unsetAttributes(); $blogs->status = Blog::STATUS_ACTIVE; if (isset($_GET['Blog']['name'])) { $blogs->name = CHtml::encode($_GET['Blog']['name']); } $this->render('index', ['blogs' => $blogs]); }
/** * Выводит список блогов * * @return void */ public function actionIndex() { $blogs = new Blog('search'); $blogs->unsetAttributes(); $blogs->status = Blog::STATUS_ACTIVE; $blogs->type = (int) Yii::app()->request->getQuery('type', Blog::TYPE_PUBLIC); if (isset($_GET['Blog']['name'])) { $blogs->name = CHtml::encode($_GET['Blog']['name']); } $this->render('index', array('blogs' => $blogs)); }
/** * Управление блогами. * * @return nothing **/ public function actionIndex() { $model = new Blog('search'); $model->unsetAttributes(); // clear any default values if (Yii::app()->getRequest()->getParam('Blog') !== null) { $model->setAttributes(Yii::app()->getRequest()->getParam('Blog')); } $this->render('index', array('model' => $model)); }
/** * Manages all models. */ public function actionAdmin() { $model = new Blog('search'); $catelist = array(); $catelist[0] = '全部'; $catelist = $catelist + Category::getDropList(1); $model->unsetAttributes(); // clear any default values if (isset($_GET['Blog'])) { $model->attributes = $_GET['Blog']; } if ($model->pid == 0) { $model->pid = ''; } $this->render('admin', array('model' => $model, 'catelist' => $catelist)); }
/** * Управление блогами. * * @return nothing **/ public function actionIndex() { $model = new Blog('search'); $model->unsetAttributes(); if (Yii::app()->getRequest()->getParam('Blog') !== null) { $model->setAttributes(Yii::app()->getRequest()->getParam('Blog')); } $this->render('index', ['model' => $model]); }
/** * Manages all models. */ public function actionAdmin() { $model = new Blog('search'); $model->unsetAttributes(); // clear any default values if (isset($_GET['Blog'])) { $model->attributes = $_GET['Blog']; } $this->render('admin', array('model' => $model)); }