当前位置: 首页>>代码示例>>PHP>>正文


PHP Blog::unsetAttributes方法代码示例

本文整理汇总了PHP中Blog::unsetAttributes方法的典型用法代码示例。如果您正苦于以下问题:PHP Blog::unsetAttributes方法的具体用法?PHP Blog::unsetAttributes怎么用?PHP Blog::unsetAttributes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Blog的用法示例。


在下文中一共展示了Blog::unsetAttributes方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: actionIndex

 /**
  * Выводит список блогов
  *
  * @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]);
 }
开发者ID:alextravin,项目名称:yupe,代码行数:15,代码来源:BlogController.php

示例2: actionIndex

 /**
  * Выводит список блогов
  *
  * @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));
 }
开发者ID:sepaker,项目名称:yupe,代码行数:16,代码来源:BlogController.php

示例3: actionIndex

 /**
  * Управление блогами.
  *
  * @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));
 }
开发者ID:sepaker,项目名称:yupe,代码行数:15,代码来源:BlogBackendController.php

示例4: actionAdmin

 /**
  * 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));
 }
开发者ID:s-nice,项目名称:24int,代码行数:19,代码来源:BlogController.php

示例5: actionIndex

 /**
  * Управление блогами.
  *
  * @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]);
 }
开发者ID:yupe,项目名称:yupe,代码行数:14,代码来源:BlogBackendController.php

示例6: actionAdmin

 /**
  * 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));
 }
开发者ID:laptopsr,项目名称:miinus,代码行数:13,代码来源:BlogController.php


注:本文中的Blog::unsetAttributes方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。