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


PHP Order::unsetAttributes方法代码示例

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


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

示例1: renderCRTypeDashboard

    public function renderCRTypeDashboard()
    {
        $model = new Order ( 'search' );
        $model->unsetAttributes();  // clear any default values
        $model->splsearch = Helper::CONST_Tomorrow;
        $model->hdnactionname = Helper::CONST_indexactionid;

        $timeslotmodel = new Persontimeslot;
        $timeslotmodel->unsetAttributes();
        $timeslotmodel->slotdate = $model->splsearch;

        if ( isset( $_GET['Order'] ) )
        {
            $model->attributes = $_GET['Order'];
            $timeslotmodel->slotdate = $model->splsearch;
        }
        $options = $this->prepareOrderGridOptions($model->hdnactionname, 
                Helper::CONST_grid_Height_200);
        $this->render( $this->getView('index','index'),
                        array(
                            'model' => $model,
                            'origin' => $model->hdnactionname,
                            'options'=> $options,
                            'fromdb' => true,
                            'timeslotmodel' => $timeslotmodel,
                            )
                    );
    }
开发者ID:Rajagunasekaran,项目名称:BACKUP,代码行数:28,代码来源:SiteController.php

示例2: actionList

	public function actionList()
	{
		$pid = 5;//支付状态
		$start = '';//开始时间
		$stop = '';//结束时间
		$model=new Order();
		//计算总共有几个订单
		$allcount = $model->count(array('condition'=>'updatetime<>0'));
		
		$model->unsetAttributes();  // clear any default values
		if(isset($_GET['pay_way'])){
			//$model->attributes=$_GET['Order'];
			$pid = $_GET['pay_way'];
		}
		
		if(isset($_GET['start'])){
			$start = $_GET['start'];
		}
		
		if(isset($_GET['stop'])){
			$stop = $_GET['stop'];
		}
		
		Yii::app()->session['myurl'] = $this->createUrl('list');
		$this->render('list',array(
			'model'=>$model,
			'pid'=>$pid,
			'start'=>$start,
			'stop'=>$stop,
				'allcount'=>$allcount,
		));
	}
开发者ID:noikiy,项目名称:letstravel,代码行数:32,代码来源:OrdersController.php

示例3: actionUpdate

 /**
  * Update order
  * @param bool $new
  * @throws CHttpException
  */
 public function actionUpdate($new = false)
 {
     if (SLicenseChecker::check() === false && SLicenseChecker::isOnLocalhost() === false) {
         throw new CHttpException(404, 'В ознакомительной версии редактирование заказов недоступно.');
     }
     if ($new === true) {
         $model = new Order();
         $model->unsetAttributes();
     } else {
         $model = $this->_loadModel($_GET['id']);
     }
     if (Yii::app()->request->isPostRequest) {
         $model->attributes = $_POST['Order'];
         if ($model->validate()) {
             $model->save();
             // Update quantities
             if (sizeof(Yii::app()->request->getPost('quantity', array()))) {
                 $model->setProductQuantities(Yii::app()->request->getPost('quantity'));
             }
             $model->updateDeliveryPrice();
             $model->updateTotalPrice();
             $this->setFlashMessage(Yii::t('OrdersModule.admin', 'Изменения успешно сохранены'));
             if (isset($_POST['REDIRECT'])) {
                 $this->smartRedirect($model);
             } else {
                 $this->redirect(array('index'));
             }
         }
     }
     $this->render('update', array('deliveryMethods' => StoreDeliveryMethod::model()->applyTranslateCriteria()->orderByName()->findAll(), 'statuses' => OrderStatus::model()->orderByPosition()->findAll(), 'model' => $model));
 }
开发者ID:kolbensky,项目名称:rybolove,代码行数:36,代码来源:OrdersController.php

示例4: actionAdmin

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

示例5: actionIndex

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

示例6: actionIndex

 public function actionIndex()
 {
     $model = new Order('search');
     $model->unsetAttributes();
     // clear any default values
     if (Yii::app()->getRequest()->getQuery('Order')) {
         $model->setAttributes(Yii::app()->getRequest()->getQuery('Order'));
     }
     $this->render('index', ['model' => $model]);
 }
开发者ID:RonLab1987,项目名称:43berega,代码行数:10,代码来源:OrderBackendController.php

示例7: actionIndex

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

示例8: actionIndex

 public function actionIndex()
 {
     $model = new Order('search');
     $model->unsetAttributes();
     if ($_GET['Order']) {
         $model->attributes = $_GET['Order'];
     }
     $users = Order::model()->getUser();
     $amount = Order::model()->getAmount();
     $this->render('index', ['model' => $model, 'users' => $users, 'amount' => $amount]);
 }
开发者ID:kl0428,项目名称:admin,代码行数:11,代码来源:OrderController.php

示例9: actionAdmin

 /**
  * list data order
  */
 public function actionAdmin()
 {
     /* untuk cek login admin */
     IsAuth::Admin();
     /* panggil model order dan function search */
     $model = new Order('search');
     /* clear semua default value attributes */
     $model->unsetAttributes();
     /* jika data order dikirim
      * sebagai kriteria pencarian */
     if (isset($_GET['Order'])) {
         /* set nilai attributes 
          * untuk pencarian data order */
         $model->attributes = $_GET['Order'];
     }
     /* render file views/orders/admin */
     $this->render('admin', array('model' => $model));
 }
开发者ID:tierous,项目名称:yiirisma,代码行数:21,代码来源:OrderController.php

示例10: actionAdmin

 /**
  * Manages all models.
  */
 public function actionAdmin()
 {
     unset(Yii::app()->request->cookies['from_date']);
     // first unset cookie for dates
     unset(Yii::app()->request->cookies['to_date']);
     $model = new Order('search');
     $model->unsetAttributes();
     // clear any default values
     if (!empty($_POST)) {
         Yii::app()->request->cookies['from_date'] = new CHttpCookie('from_date', $_POST['from_date']);
         // define cookie for from_date
         Yii::app()->request->cookies['to_date'] = new CHttpCookie('to_date', $_POST['to_date']);
         $model->from_date = $_POST['from_date'];
         $model->to_date = $_POST['to_date'];
     }
     if (isset($_GET['Order'])) {
         $model->attributes = $_GET['Order'];
     }
     $this->render('admin', array('model' => $model));
 }
开发者ID:Gameonn,项目名称:JS_API,代码行数:23,代码来源:OrderController.php

示例11: actionUpdate

 /**
  * Update order
  * @param bool $new
  * @throws CHttpException
  */
 public function actionUpdate($new = false)
 {
     Yii::app()->clientScript->registerScriptFile($this->module->assetsUrl . '/admin/orders.update.js', CClientScript::POS_END);
     if ($new === true) {
         $model = new Order();
         $model->unsetAttributes();
     } else {
         $model = $this->_loadModel($_GET['id']);
     }
     if (!$model->isNewRecord) {
         $update = Yii::t('CartModule.admin', 'UPDATE_ORDER', array('{order_id}' => CHtml::encode($model->id)));
     }
     $this->pageName = $model->isNewRecord ? Yii::t('CartModule.admin', 'Создание заказа') : Yii::t('CartModule.admin', 'ORDER', 0);
     $this->breadcrumbs = array(Yii::t('CartModule.admin', 'ORDER', 0) => $this->createUrl('index'), $model->isNewRecord ? Yii::t('CartModule.admin', 'Создание заказа') : $update);
     if (Yii::app()->request->isPostRequest) {
         $model->attributes = $_POST['Order'];
         if ($model->validate()) {
             $model->save();
             // Update quantities
             if (sizeof(Yii::app()->request->getPost('quantity', array()))) {
                 $model->setProductQuantities(Yii::app()->request->getPost('quantity'));
             }
             $model->updateDeliveryPrice();
             $model->updateTotalPrice();
             if ($model->isNewRecord === false) {
                 $template[] = 'delete';
             }
             // register all delivery methods to recalculate prices
             Yii::app()->clientScript->registerScript('deliveryMetohds', strtr('var deliveryMethods = {data};', array('{data}' => CJavaScript::jsonEncode($deliveryMethods))), CClientScript::POS_END);
             ///  if ($new) {
             //      $this->setFlashMessage(Yii::t('core', 'Теперь Вы можете добавить товары.'));
             //}
             $this->redirect(array('update', 'id' => $model->id));
         }
     }
     $this->render('update', array('deliveryMethods' => ShopDeliveryMethod::model()->applyTranslateCriteria()->orderByName()->findAll(), 'paymentMethods' => ShopPaymentMethod::model()->findAll(), 'statuses' => OrderStatus::model()->orderByPosition()->findAll(), 'model' => $model));
 }
开发者ID:buildshop,项目名称:bs-common,代码行数:42,代码来源:DefaultController.php

示例12: actionRecord

	public function actionRecord($id)
	{
		$model=new Order('search');
		$model->unsetAttributes();  // clear any default values
		$model->mid = $id;
		if(isset($_GET['Order']))
			$model->attributes=$_GET['Order'];
		
		$this->render('record',array(
				'model'=>$model,
		));
	}
开发者ID:noikiy,项目名称:letstravel,代码行数:12,代码来源:MemberController.php

示例13: actionAdmin

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

示例14: actionViewAssignedOrders

 public function actionViewAssignedOrders()
 {
     $model = new Order('viewAssignedOrders');
     $model->unsetAttributes();
     // clear any default values
     if (isset($_GET['Order'])) {
         $model->attributes = $_GET['Order'];
     }
     if (isset($_GET['pageSize'])) {
         Yii::app()->user->setState('pageSize', (int) $_GET['pageSize']);
         unset($_GET['pageSize']);
     }
     $this->render('viewAssignedOrders', array('model' => $model));
 }
开发者ID:rodespsan,项目名称:LMEC,代码行数:14,代码来源:OrderController.php

示例15: actionAdmin

 /**
  * Manages all models.
  */
 public function actionAdmin()
 {
     $model = new Order( 'search' );
     $model->unsetAttributes();  // clear any default values
     $this->subTitle = ucwords( $this->action->id ) . ' ' . $this->getMenuLabels( ucwords( $this->controllerID ) );
     if ( isset( $_GET['Order'] ) )
         $model->attributes = $_GET['Order'];
        if(!empty( $_GET['actionid'] ) && $_GET['actionid'] == Helper::CONST_PDF)
         {
             $html = $this->renderPartial( 'admin', array(
                         'model' => $model,
                     ),true );
             
             $this->writeToPdf( $html );
         }
         else
         {
     $this->render( 'admin', array(
         'model' => $model,
     ) );
         }
 }
开发者ID:Rajagunasekaran,项目名称:BACKUP,代码行数:25,代码来源:OrderController.php


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