本文整理汇总了PHP中TBGSettings::getLogoutReturnRoute方法的典型用法代码示例。如果您正苦于以下问题:PHP TBGSettings::getLogoutReturnRoute方法的具体用法?PHP TBGSettings::getLogoutReturnRoute怎么用?PHP TBGSettings::getLogoutReturnRoute使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TBGSettings
的用法示例。
在下文中一共展示了TBGSettings::getLogoutReturnRoute方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: runLogout
/**
* Logs the user out
*
* @param TBGRequest $request
*/
public function runLogout(TBGRequest $request)
{
if ($this->getUser() instanceof TBGUser) {
TBGLogging::log('Setting user logout state');
$this->getUser()->setOffline();
}
TBGContext::logout();
if ($request->isAjaxCall()) {
return $this->renderJSON(array('status' => 'logout ok', 'url' => TBGContext::getRouting()->generate(TBGSettings::getLogoutReturnRoute())));
}
$this->forward(TBGContext::getRouting()->generate(TBGSettings::getLogoutReturnRoute()));
}
示例2: array
>
<?php
$return_routes = array('home' => __('Frontpage'));
?>
<?php
$return_routes = TBGEvent::createNew('core', 'setting_returnfromlogout', null, array(), $return_routes)->trigger()->getReturnList();
?>
<?php
foreach ($return_routes as $route => $description) {
?>
<option value="<?php
echo $route;
?>
"<?php
if (TBGSettings::getLogoutReturnRoute() == $route) {
?>
selected<?php
}
?>
><?php
echo $description;
?>
</option>
<?php
}
?>
</select>
</td>
</tr>
<tr>
示例3: runLogout
/**
* Logs the user out
*
* @param TBGRequest $request
*/
public function runLogout(TBGRequest $request)
{
if (TBGContext::getUser() instanceof TBGUser) {
TBGLogging::log('Setting user logout state');
TBGContext::getUser()->setOffline();
}
TBGContext::logout();
$this->forward(TBGContext::getRouting()->generate(TBGSettings::getLogoutReturnRoute()));
}