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


PHP Customer::unsetAttributes方法代码示例

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


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

示例1: actionIndex

 /**
  * This is the default 'index' action that is invoked
  * when an action is not explicitly requested by users.
  */
 public function actionIndex()
 {
     if (!Yii::app()->user->id) {
         $this->redirect(array('site/login'));
     }
     $user = User::model()->findByPk(Yii::app()->user->uid);
     $status = CHtml::listData(Status::getStatus(), 'status', 'image');
     if ($user->role_id == 2) {
         Yii::app()->user->setState('role', 2);
     }
     if (Yii::app()->user->isUser()) {
         $model = new Customer('search');
         $model->franchise();
         $model->desc();
         $model->unsetAttributes();
         if (isset($_GET['Customer'])) {
             $model->attributes = $_GET['Customer'];
         }
         $this->render('//customer/admin1', array('model' => $model, 'statuses' => json_encode($status)));
     } else {
         $criteria = new CDbCriteria();
         $criteria->order = 'id desc';
         if (Yii::app()->user->isFranchiseAdmin()) {
             $criteria->compare('franchise', Yii::app()->user->franchise);
         }
         $dataProvider = new CActiveDataProvider('Customer', array('criteria' => $criteria, 'pagination' => array('pageSize' => 10)));
         $this->render('welcome', array('dataProvider' => $dataProvider));
     }
 }
开发者ID:VishalSuriMcc,项目名称:jaspersiform,代码行数:33,代码来源:SiteController_b.php

示例2: actionAdmin

 public function actionAdmin()
 {
     $model = new Customer('search');
     $model->unsetAttributes();
     if (isset($_GET['Customer'])) {
         $model->setAttributes($_GET['Customer']);
     }
     $this->render('admin', array('model' => $model));
 }
开发者ID:schmunk42,项目名称:yii-sakila-crud,代码行数:9,代码来源:CustomerController.php

示例3: actionIndex

 /**
  * This is the default 'index' action that is invoked
  * when an action is not explicitly requested by users.
  */
 public function actionIndex()
 {
     $this->pageTitle = "List of Customer";
     $model = new Customer('search');
     $model->unsetAttributes();
     if (isset($_GET['Customer'])) {
         $model->attributes = $_GET['Customer'];
     }
     $this->render($this->view . 'index', array('model' => $model));
 }
开发者ID:hson91,项目名称:posnail,代码行数:14,代码来源:CustomerController.php

示例4: actionAdmin

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

示例5: array

?>
	</div>
	  </td>
		     <td>
		  <div class="row">
		<?php 
echo $form->labelEx($model, 'addressbookid');
?>
		<?php 
echo $form->hiddenField($model, 'addressbookid');
?>
	  <input type="text" name="product_name" id="fullname" readonly >
    <?php 
$this->beginWidget('zii.widgets.jui.CJuiDialog', array('id' => 'addressbook_dialog', 'options' => array('title' => Yii::t('app', 'Customer'), 'width' => 'auto', 'autoOpen' => false, 'modal' => true)));
$customer = new Customer('search');
$customer->unsetAttributes();
// clear any default values
if (isset($_GET['Customer'])) {
    $customer->attributes = $_GET['Customer'];
}
$this->widget('zii.widgets.grid.CGridView', array('id' => 'addressbook-grid', 'dataProvider' => $customer->Searchwstatus(), 'filter' => $customer, 'template' => '{summary}{pager}<br>{items}{pager}{summary}', 'columns' => array(array('header' => '', 'type' => 'raw', 'value' => 'CHtml::Button("+",
          array("name" => "send_absschedule",
          "id" => "send_absschedule",
          "onClick" => "$(\\"#addressbook_dialog\\").dialog(\\"close\\"); $(\\"#fullname\\").val(\\"$data->fullname\\"); $(\\"#Soheader_addressbookid\\").val(\\"$data->addressbookid\\");
		  "))'), array('name' => 'addressbookid', 'visible' => false, 'value' => '$data->addressbookid'), 'fullname')));
$this->endWidget('zii.widgets.jui.CJuiDialog');
echo CHtml::Button('...', array('onclick' => '$.fn.yiiGridView.update("addressbook-grid");$("#addressbook_dialog").dialog("open"); return false;'));
?>
		<?php 
echo $form->error($model, 'addressbookid');
?>
开发者ID:bylinggha,项目名称:Capella-ERP-Indonesia,代码行数:31,代码来源:_form.php

示例6: actionIndex

 /**
  * Lists all models.
  */
 public function actionIndex()
 {
     parent::actionIndex();
     $this->lookupdata();
     $model = new Customer('searchwstatus');
     $model->unsetAttributes();
     // clear any default values
     if (isset($_GET['Customer'])) {
         $model->attributes = $_GET['Customer'];
     }
     if (isset($_GET['pageSize'])) {
         Yii::app()->user->setState('pageSize', (int) $_GET['pageSize']);
         unset($_GET['pageSize']);
         // would interfere with pager and repetitive page size change
     }
     $this->render('index', array('model' => $model, 'customeraddress' => $this->customeraddress, 'customercontact' => $this->customercontact, 'acchutang' => $this->acchutang));
 }
开发者ID:bylinggha,项目名称:Capella-ERP-Indonesia,代码行数:20,代码来源:CustomerController.php

示例7: actionAdmin

 /**
  * Manages all models.
  */
 public function actionAdmin()
 {
     $model = new Customer('search');
     $model->unsetAttributes();
     // clear any default values
     if (isset($_GET['Customer'])) {
         $model->attributes = $_GET['Customer'];
     }
     if (isset($_GET['pageSize'])) {
         Yii::app()->user->setState('pageSize', (int) $_GET['pageSize']);
         unset($_GET['pageSize']);
     }
     $this->render('admin', array('model' => $model));
 }
开发者ID:rodespsan,项目名称:LMEC,代码行数:17,代码来源:CustomerController.php

示例8: actionCustomers

 public function actionCustomers()
 {
     $model = new Customer('search');
     $model->unsetAttributes();
     // clear any default values
     if (isset($_GET['Customer'])) {
         $model->attributes = $_GET['Customer'];
     }
     $this->render('cus_index', array('customer' => $model, 'hasType' => false));
 }
开发者ID:nwz-orientationsys,项目名称:carsWebsite,代码行数:10,代码来源:UserController.php


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