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


PHP Item::unsetAttributes方法代码示例

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


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

示例1: actionAdmin

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

示例2: actionOutStock

 public function actionOutStock()
 {
     if (Yii::app()->user->checkAccess('item.index')) {
         $model = new Item('outstock');
         $model->unsetAttributes();
         // clear any default values
         if (isset($_GET['Item'])) {
             $model->attributes = $_GET['Item'];
         }
         $this->render('_out_stock', array('model' => $model));
     } else {
         throw new CHttpException(403, 'You are not authorized to perform this action');
     }
 }
开发者ID:soklux,项目名称:bakou-pos-apsara,代码行数:14,代码来源:ItemController.php

示例3: actionAdd_goods

 public function actionAdd_goods()
 {
     $this->layout = '/';
     $goods = new Item('search');
     $goods->unsetAttributes();
     if (isset($_GET['Item'])) {
         $goods->attributes = $_GET['Item'];
     }
     $this->render('add_goods', array('goods' => $goods));
 }
开发者ID:lhfcainiao,项目名称:basic,代码行数:10,代码来源:OrderController.php

示例4: actionIndex

 public function actionIndex($alias = '')
 {
     //$this->processPageRequest('page');
     $filter = array();
     // Список видов камней
     $categoryList = Category::model()->published()->findAll(array('order' => 't.sort ASC'));
     // Определяем, выбран или нет вид камня
     $category = null;
     if (!empty($alias)) {
         // Если выбран вид камня
         $category = Category::model()->published()->with(array('slides' => array('scopes' => 'published', 'order' => 'slides.sort ASC')))->find('t.alias = :alias', array(':alias' => $alias));
         if (!$category) {
             throw new CHttpException(404);
         }
         $page = $category;
         $filter['category_id'] = $category->id;
     } else {
         // Загружаем страницу "Каталог хим. средств"
         Yii::import("application.modules.page.models.Page");
         $page = Page::model()->with(array('slides' => array('scopes' => 'published', 'order' => 'slides.sort ASC')))->findByPath("chemical");
     }
     // Список товаров
     $criteria = new CDbCriteria();
     $criteria->with = array('images' => array('scopes' => 'published', 'order' => 'images.sort ASC'));
     $criteria->order = 't.title ASC';
     $model = new Item('user_search');
     $model->unsetAttributes();
     if (isset($_GET['Item'])) {
         $model->attributes = $_GET['Item'];
         if ($model->title != '') {
             $criteria->condition = "t.title LIKE :title";
             $criteria->params = array(':title' => $model->title . '%');
             $filter['title'] = $model->title;
         }
         if (!empty($model->producer_id)) {
             $criteria->compare('t.producer_id', $model->producer_id);
             $filter['producer_id'] = $model->producer_id;
         }
     }
     // Если выбран вид камня
     if (!empty($category)) {
         $model = $model->category($category->id);
     }
     $dataProvider = new CActiveDataProvider($model->published(), array('criteria' => $criteria, 'pagination' => array('pageVar' => 'page')));
     // Сохраняем ссылку для возврата
     Yii::app()->user->setState('chemicalCatalogReturnUrl', Yii::app()->request->requestUri);
     // Сохраняем данные фильтра в сессии
     //$filter['page'] = (int) Yii::app()->request->getParam('page', 1);
     Yii::app()->user->setState('chemicalCatalogFilter', $filter);
     if (Yii::app()->request->isAjaxRequest) {
         // Обновление списка для бесконечной загрузки элементов
         if (isset($_GET['showMore'])) {
             $this->renderPartial('_list_ajax', array('dataProvider' => $dataProvider, 'pageNumber' => (int) Yii::app()->request->getParam('page', 1)));
         } else {
             $this->renderPartial('_list', array('dataProvider' => $dataProvider), false, true);
         }
         Yii::app()->end();
     } else {
         // Вывод каталога
         $this->render('index', array('page' => $page, 'model' => $model, 'dataProvider' => $dataProvider, 'categoryList' => $categoryList, 'sizerVariants' => $sizerVariants));
     }
 }
开发者ID:kuzmina-mariya,项目名称:unizaro-stone,代码行数:62,代码来源:CatalogController_1.php

示例5: actionAdminbycriteria

 public function actionAdminbycriteria($id, $nama)
 {
     $model = new Item('searchByBarcode($id)');
     $model->unsetAttributes();
     // clear any default values
     if (isset($_GET['Item'])) {
         $model->attributes = $_GET['Item'];
     }
     $this->render('admin', array('model' => $model, 'nama' => $nama, 'barcode_id' => $id));
 }
开发者ID:jumper2012,项目名称:ITStorage-Agincourt-Resources,代码行数:10,代码来源:ItemController.php

示例6: actionAdmin

 /**
  * Manages all models.
  */
 public function actionAdmin()
 {
     $model = new Item('search');
     $model->unsetAttributes();
     // clear any default values
     $vl = 'item-grid';
     if (isset($_POST['Item'])) {
         $model->attributes = $_POST['Item'];
     }
     if (isset($_GET['ajax'])) {
         // Render partial file created in Step 1
         $this->renderPartial('_ajax', array('model' => $model));
         Yii::app()->end();
     }
     //if(isset($_GET['Item']))
     //	$model->attributes=$_GET['Item'];
     $this->render('admin', array('model' => $model));
 }
开发者ID:hkhateb,项目名称:linet3,代码行数:21,代码来源:ItemController.php


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