本文整理汇总了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)]);
}
示例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)]);
}
示例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]);
}
示例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]);
}
示例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]);
}