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


PHP Domain::unsetAttributes方法代码示例

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


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

示例1: actionIndex

 /**
  * Lists all models.
  */
 public function actionIndex()
 {
     $model = new Domain('search');
     $model->unsetAttributes();
     // clear any default values
     if (isset($_GET['Domain'])) {
         $model->attributes = $_GET['Domain'];
     }
     $userId = Yii::app()->user->getId();
     $user = User::model()->findByPK($userId);
     $this->render('index', array('model' => $model, 'user' => $user));
 }
开发者ID:vitaliy7711,项目名称:pdnsops,代码行数:15,代码来源:DomainController.php

示例2: actionAdmin

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

示例3: actionDomain

 public function actionDomain()
 {
     $application = new ApplicationDomainMentor();
     $domains = new Domain();
     if (Yii::app()->getRequest()->isPostRequest) {
         $user = User::model()->getCurrentUser();
         $application->attributes = $_POST['ApplicationDomainMentor'];
         $application->status = 'Admin';
         $application->user_id = $user->id;
         $application->date_created = new CDbExpression('NOW()');
         $application->save(false);
         $picks = $_POST['domPicks'];
         $picks = explode(',', $picks);
         foreach ($picks as $pick) {
             $dbpick = new ApplicationDomainMentorPick();
             $dbpick->app_id = $application->id;
             $temp = explode(':', $pick);
             $dbpick->domain_id = $temp[0];
             $dbpick->proficiency = $temp[1];
             $dbpick->approval_status = 'Proposed by Mentor';
             $dbpick->save(false);
         }
         $picks = $_POST['subPicks'];
         if (isset($picks) && $picks != "") {
             $picks = explode(',', $picks);
             foreach ($picks as $pick) {
                 $dbpick = new ApplicationSubdomainMentorPick();
                 $dbpick->app_id = $application->id;
                 $temp = explode(':', $pick);
                 $dbpick->subdomain_id = $temp[0];
                 $dbpick->proficiency = $temp[1];
                 $dbpick->approval_status = 'Proposed by Mentor';
                 $dbpick->save(false);
             }
         }
         $this->redirect("/coplat/index.php/application/portal");
     } else {
         // on initial load
         $domains->unsetAttributes();
         $domain = Domain::model()->getDomainsForApp($domains->searchNoPagination());
     }
     $error = '';
     $this->render('domain', array('application' => $application, 'domain' => $domain, 'error' => $error));
 }
开发者ID:acuba001,项目名称:Collaborative-Platform,代码行数:44,代码来源:ApplicationController.php


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