本文整理汇总了PHP中WebRequest::appendQueryValue方法的典型用法代码示例。如果您正苦于以下问题:PHP WebRequest::appendQueryValue方法的具体用法?PHP WebRequest::appendQueryValue怎么用?PHP WebRequest::appendQueryValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WebRequest
的用法示例。
在下文中一共展示了WebRequest::appendQueryValue方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: mobileFooter
/**
* Prepares links used in the mobile footer
* @param Skin $sk
* @param QuickTemplate $tpl
* @param MobileContext $ctx
* @param Title $title
* @param WebRequest $req
* @return QuickTemplate
*/
protected static function mobileFooter($sk, $tpl, $ctx, $title, $req)
{
$url = $sk->getOutput()->getProperty('desktopUrl');
if ($url) {
$url = wfAppendQuery($url, 'mobileaction=toggle_view_desktop');
} else {
$url = $title->getLocalUrl($req->appendQueryValue('mobileaction', 'toggle_view_desktop', true));
}
$url = htmlspecialchars($ctx->getDesktopUrl(wfExpandUrl($url, PROTO_RELATIVE)));
$desktop = wfMessage('mobile-frontend-view-desktop')->escaped();
$mobile = wfMessage('mobile-frontend-view-mobile')->escaped();
$sitename = self::getSitename(true);
$switcherHtml = <<<HTML
<h2>{$sitename}</h2>
<ul>
\t<li>{$mobile}</li><li><a id="mw-mf-display-toggle" href="{$url}">{$desktop}</a></li>
</ul>
HTML;
// Generate the licensing text displayed in the footer of each page.
// See Skin::getCopyright for desktop equivalent.
$license = self::getLicense('footer');
if (isset($license['link']) && $license['link']) {
$licenseText = $sk->msg($license['msg'])->rawParams($license['link'])->text();
} else {
$licenseText = '';
}
// Enable extensions to add links to footer in Mobile view, too - bug 66350
Hooks::run('MobileSiteOutputPageBeforeExec', array(&$sk, &$tpl));
// FIXME: Deprecate this hook.
Hooks::run('SkinMinervaOutputPageBeforeExec', array(&$sk, &$tpl), '1.26');
$tpl->set('mobile-switcher', $switcherHtml);
$tpl->set('mobile-license', $licenseText);
$tpl->set('privacy', $sk->footerLink('mobile-frontend-privacy-link-text', 'privacypage'));
$tpl->set('terms-use', self::getTermsLink($sk));
$tpl->set('footerlinks', array('info' => array('mobile-switcher', 'mobile-license'), 'places' => array('terms-use', 'privacy')));
return $tpl;
}