本文整理匯總了PHP中N2Request::redirect方法的典型用法代碼示例。如果您正苦於以下問題:PHP N2Request::redirect方法的具體用法?PHP N2Request::redirect怎麽用?PHP N2Request::redirect使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類N2Request
的用法示例。
在下文中一共展示了N2Request::redirect方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: actionFonts
public function actionFonts()
{
if ($this->canDo('nextend_config')) {
$fonts = N2Request::getVar('fonts', false);
if ($fonts) {
if ($this->validateToken()) {
N2Fonts::storeSettings($fonts);
N2Message::success(n2_('Saved.'));
N2Request::redirect($this->appType->router->createUrl(array("settings/fonts")));
} else {
$this->refresh();
}
}
$this->addView("../../inline/sidebar/settings", array("appObj" => $this), "sidebar");
$this->addView("fonts");
$this->render();
}
}
示例2: redirect
public function redirect($url, $statusCode = 302, $terminate = true)
{
N2Request::redirect($this->appType->router->createUrl($url), $statusCode, $terminate);
}
示例3: redirectToCreate
function redirectToCreate()
{
N2Request::redirect($this->appType->router->createUrl(array("sliders/create")), 302, true);
}