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


PHP LBApplication::setCurrentlySelectedSubscription方法代码示例

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


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

示例1: actionSubscription

 /**
  * Switch subscription
  * 
  * @param unknown $id
  */
 public function actionSubscription($id)
 {
     LBApplication::setCurrentlySelectedSubscription($id);
     $this->redirect(Yii::app()->baseUrl . "/" . $id . "/lbInvoice/dashboard");
 }
开发者ID:Lucerin,项目名称:Yii-projects,代码行数:10,代码来源:SiteController.php

示例2: actionCreate

 /**
  * Creates a new model.
  * If creation is successful, the browser will be redirected to the 'view' page.
  */
 public function actionCreate()
 {
     $model = new AccountSubscription();
     // Uncomment the following line if AJAX validation is needed
     // $this->performAjaxValidation($model);
     if (isset($_POST['AccountSubscription'])) {
         //			$model->attributes=$_POST['AccountSubscription'];
         //			if($model->save())
         //				$this->redirect(array('view','id'=>$model->account_subscription_id));
         //                    if (isset($_GET['package_id']))
         //                    {
         $package_id = 4;
         // check if this user is already subscribe to this package
         //			if (AccountSubscription::model()->isAlreadySubscribedToPackage($package_id))
         //			{
         //				$this->redirect(array('accountTeamMember/admin'));
         //			}
         // add subscription
         $accountSubscription = new AccountSubscription();
         $accountSubscription->account_id = Yii::app()->user->id;
         $accountSubscription->account_subscription_package_id = $package_id;
         $accountSubscription->account_subscription_start_date = date('Y-m-d H:i:s');
         $accountSubscription->account_subscription_status_id = ACCOUNT_SUBSCRIPTION_STATUS_ACTIVE;
         $accountSubscription->subscription_name = $_POST['AccountSubscription']['subscription_name'];
         if ($accountSubscription->save()) {
             LBApplication::setCurrentlySelectedSubscription($accountSubscription->account_subscription_id);
         }
         $this->redirect(array('accountTeamMember/admin'));
         //                        }
         //                        // no package id, go to home
         //                        $this->redirect(array('project/index'));
     }
     $this->render('create', array('model' => $model));
 }
开发者ID:Lucerin,项目名称:Yii-projects,代码行数:38,代码来源:AccountSubscriptionController.php


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