當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。