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


PHP Tabs::rememberActiveState方法代码示例

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


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

示例1: actionView

 /**
  * Displays a single Role model.
  * @param integer $id
  *
  * @return mixed
  */
 public function actionView($id)
 {
     \Yii::$app->session['__crudReturnUrl'] = Url::previous();
     Url::remember();
     Tabs::rememberActiveState();
     return $this->render('view', ['model' => $this->findModel($id)]);
 }
开发者ID:febfeb,项目名称:yii2-basic-ready,代码行数:13,代码来源:RoleController.php

示例2: actionView

 /**
  * Displays a single Country model.
  * @param integer $country_id
  *
  * @return mixed
  */
 public function actionView($country_id)
 {
     $resolved = \Yii::$app->request->resolve();
     $resolved[1]['_pjax'] = null;
     $url = Url::to(array_merge(['/' . $resolved[0]], $resolved[1]));
     \Yii::$app->session['__crudReturnUrl'] = Url::previous();
     Url::remember($url);
     Tabs::rememberActiveState();
     return $this->render('view', ['model' => $this->findModel($country_id)]);
 }
开发者ID:schmunk42,项目名称:giiant-crud-examples,代码行数:16,代码来源:CountryController.php

示例3: actionView

 /**
  * Displays a single Subdistrict model.
  * @param integer $id
  *
  * @return mixed
  */
 public function actionView($id)
 {
     $model = $this->findModel($id);
     if ($model->operation->allowView == FALSE) {
         throw $model->operation->exception('view');
     }
     \Yii::$app->session['__crudReturnUrl'] = ReturnUrl::getUrl(Url::previous());
     Url::remember();
     Tabs::rememberActiveState();
     return $this->render('view', ['model' => $model]);
 }
开发者ID:fredyns,项目名称:yii2-boilerplate,代码行数:17,代码来源:SubdistrictController.php

示例4: actionView

 /**
  * Displays a single Table model.
  * @param integer $id
  *
  * @return mixed
  */
 public function actionView($id)
 {
     $table = $this->findModel($id);
     $searchModel = null;
     $dataProvider = null;
     if ($table->model_search_class != null) {
         $class = $table->model_search_class;
         $searchModel = new $class();
         $dataProvider = $searchModel->search($_GET);
     }
     \Yii::$app->session['__crudReturnUrl'] = Url::previous();
     Url::remember();
     Tabs::rememberActiveState();
     return $this->render('view', ['model' => $table, 'searchModel' => $searchModel, 'dataProvider' => $dataProvider]);
 }
开发者ID:febfeb,项目名称:yii2-dynamic-field,代码行数:21,代码来源:TableController.php

示例5: actionView

 /**
  * Displays a single Budget model.
  * @param integer $id
  *
  * @return mixed
  */
 public function actionView($id)
 {
     $modelHistory = new BudgetHistory();
     $historySearch = new BudgetHistorySearch();
     $providerIncome = $historySearch->searchItems($id, BudgetItem::TYPE_INCOME, Yii::$app->request->queryParams);
     $providerCost = $historySearch->searchItems($id, BudgetItem::TYPE_COST, Yii::$app->request->queryParams);
     \Yii::$app->session['__crudReturnUrl'] = Url::previous();
     Url::remember();
     Tabs::rememberActiveState();
     try {
         if ($modelHistory->load($_POST) && $modelHistory->save()) {
             return $this->redirect(Url::previous());
         } elseif (!\Yii::$app->request->isPost) {
             $modelHistory->load($_GET);
         }
     } catch (\Exception $e) {
         $msg = isset($e->errorInfo[2]) ? $e->errorInfo[2] : $e->getMessage();
         $modelHistory->addError('_exception', $msg);
     }
     return $this->render('view', ['model' => $this->findModel($id), 'modelHistory' => $modelHistory, 'providerIncome' => $providerIncome, 'providerCost' => $providerCost]);
 }
开发者ID:alexus007,项目名称:budget,代码行数:27,代码来源:BudgetController.php


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