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


PHP Articles::unsetAttributes方法代码示例

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


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

示例1: actionManage

 /**
  * Manages all models.
  */
 public function actionManage()
 {
     $model = new Articles('search');
     $model->unsetAttributes();
     // clear any default values
     if (isset($_GET['Articles'])) {
         $model->attributes = $_GET['Articles'];
     }
     $columnTemp = array();
     if (isset($_GET['GridColumn'])) {
         foreach ($_GET['GridColumn'] as $key => $val) {
             if ($_GET['GridColumn'][$key] == 1) {
                 $columnTemp[] = $key;
             }
         }
     }
     $columns = $model->getGridColumn($columnTemp);
     if (isset($_GET['category'])) {
         $category = ArticleCategory::model()->findByPk($_GET['category']);
         $title = ': ' . Phrase::trans($category->name, 2);
     } else {
         $title = '';
     }
     $this->pageTitle = Yii::t('phrase', 'View Articles') . $title;
     $this->pageDescription = Yii::t('phrase', 'Use this page to search for and manage article entries. To Approve or Feature an article, just click on the icon, it will automate turn on and off per that setting. To edit, delete, or manage an article, please login as that user, and perform your actions.');
     $this->pageMeta = '';
     $this->render('admin_manage', array('model' => $model, 'columns' => $columns));
 }
开发者ID:OmmuOpenSource,项目名称:OOS-Company-Profile,代码行数:31,代码来源:AdminController.php

示例2: actionIndex

 /**
  * Lists all models.
  */
 public function actionIndex()
 {
     $model = new Articles('search');
     $model->unsetAttributes();
     // clear any default values
     if (isset($_GET['Articles'])) {
         $model->attributes = $_GET['Articles'];
     }
     $this->render('index', array('model' => $model, 'actions' => $this->listActionsCanAccess));
 }
开发者ID:jasonhai,项目名称:onehome,代码行数:13,代码来源:ArticlesController.php

示例3: actionList_articles

 public function actionList_articles()
 {
     if (Yii::app()->user->isGuest) {
         $this->redirect($this->createAbsoluteUrl('default/index'));
     }
     $model = new Articles('search');
     $model->unsetAttributes();
     if (isset($_GET['Articles'])) {
         $model->setAttributes($_GET['Articles'], false);
     }
     $category = Categorys::getAllCategories();
     $menus = Mainmenu::model()->getDropDownMenu();
     $this->render('articles/list_articles', array('model' => $model, 'menus' => $menus, 'category' => $category));
 }
开发者ID:vitalya-xxx,项目名称:vitacod.ru,代码行数:14,代码来源:DefaultController.php

示例4: actionAdmin

	/**
	 * Manages all models.
	 */
	public function actionAdmin()
	{
        if(Yii::app()->user->checkAccess('admin')){
            $model=new Articles('search');
            $model->unsetAttributes();  // clear any default values
            if(isset($_GET['Articles']))
                $model->attributes=$_GET['Articles'];

            $this->render('admin',array(
                'model'=>$model,
            ));
        } else {
            $this->redirect('/admin/user/login');
        }

	}
开发者ID:schiz,项目名称:teff,代码行数:19,代码来源:ArticlesController.php

示例5: actionAdmin

 /**
  * Manages all models.
  */
 public function actionAdmin()
 {
     $model = new Articles('search');
     $model->unsetAttributes();
     // clear any default values
     if (isset($_GET['Articles'])) {
         $model->attributes = $_GET['Articles'];
     }
     $this->render('admin', array('model' => $model));
 }
开发者ID:fipumjdeveloper,项目名称:web,代码行数:13,代码来源:ArticlesController.php


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