當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Inventory::unsetAttributes方法代碼示例

本文整理匯總了PHP中Inventory::unsetAttributes方法的典型用法代碼示例。如果您正苦於以下問題:PHP Inventory::unsetAttributes方法的具體用法?PHP Inventory::unsetAttributes怎麽用?PHP Inventory::unsetAttributes使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Inventory的用法示例。


在下文中一共展示了Inventory::unsetAttributes方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: actionAdmin

 public function actionAdmin()
 {
     $model = new Inventory('search');
     $model->unsetAttributes();
     if (isset($_GET['Inventory'])) {
         $model->setAttributes($_GET['Inventory']);
     }
     $this->render('admin', array('model' => $model));
 }
開發者ID:schmunk42,項目名稱:yii-sakila-crud,代碼行數:9,代碼來源:InventoryController.php

示例2: actionAdmin

 /**
  * Manages all models.
  */
 public function actionAdmin()
 {
     $model = new Inventory('search');
     $model->unsetAttributes();
     // clear any default values
     if (isset($_GET['Inventory'])) {
         $model->attributes = $_GET['Inventory'];
     }
     $this->render('admin', array('model' => $model));
 }
開發者ID:griffindor,項目名稱:own-inventory,代碼行數:13,代碼來源:InventoryController.php

示例3: actionAdmin

 /**
  * Manages all models.
  */
 public function actionAdmin($item_id)
 {
     $model = new Inventory('search');
     $model->unsetAttributes();
     // clear any default values
     if (isset($_GET['Inventory'])) {
         $model->attributes = $_GET['Inventory'];
     }
     $item = Item::model()->getItemInfo($item_id);
     if (Yii::app()->request->isAjaxRequest) {
         $cs = Yii::app()->clientScript;
         $cs->scriptMap = array('jquery.js' => false, 'bootstrap.js' => false, 'jquery.ba-bbq.min.js' => false, 'jquery.yiigridview.js' => false, 'bootstrap.min.js' => false, 'jquery.min.js' => false, 'bootstrap.notify.js' => false, 'bootstrap.bootbox.min.js' => false);
         Yii::app()->clientScript->scriptMap['*.js'] = false;
         //Yii::app()->clientScript->scriptMap['*.css'] = false;
         if (isset($_GET['ajax']) && $_GET['ajax'] == 'inventory-grid') {
             $this->render('admin', array('model' => $model, 'item_id' => $item_id, 'item' => $item));
         } else {
             echo CJSON::encode(array('status' => 'render', 'div' => $this->renderPartial('admin', array('model' => $model, 'item_id' => $item_id, 'item' => $item), true, true)));
             Yii::app()->end();
         }
     } else {
         $this->render('admin', array('model' => $model, 'item_id' => $item_id, 'item' => $item));
     }
 }
開發者ID:noonnightcoder,項目名稱:bakou-pos-apsara,代碼行數:27,代碼來源:InventoryController.php


注:本文中的Inventory::unsetAttributes方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。