本文整理汇总了PHP中Linker::getInternalLinkAttributes方法的典型用法代码示例。如果您正苦于以下问题:PHP Linker::getInternalLinkAttributes方法的具体用法?PHP Linker::getInternalLinkAttributes怎么用?PHP Linker::getInternalLinkAttributes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Linker
的用法示例。
在下文中一共展示了Linker::getInternalLinkAttributes方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getInternalLinkAttributes
/**
* @deprecated since 1.27
*/
public function getInternalLinkAttributes($title, $unused = null, $class = '')
{
wfDeprecated(__METHOD__, '1.27');
return Linker::getInternalLinkAttributes($title, $unused, $class);
}
示例2: pageTitleLinks
function pageTitleLinks()
{
global $wgOut, $wgUser, $wgRequest, $wgLang;
$oldid = $wgRequest->getVal('oldid');
$diff = $wgRequest->getVal('diff');
$action = $wgRequest->getText('action');
$skin = $this->getSkin();
$title = $skin->getTitle();
$s[] = $this->printableLink();
$disclaimer = $skin->disclaimerLink();
# may be empty
if ($disclaimer) {
$s[] = $disclaimer;
}
$privacy = $skin->privacyLink();
# may be empty too
if ($privacy) {
$s[] = $privacy;
}
if ($wgOut->isArticleRelated()) {
if ($title->getNamespace() == NS_FILE) {
$name = $title->getDBkey();
$image = wfFindFile($title);
if ($image) {
$link = htmlspecialchars($image->getURL());
$style = Linker::getInternalLinkAttributes($link, $name);
$s[] = "<a href=\"{$link}\"{$style}>{$name}</a>";
}
}
}
if ('history' == $action || isset($diff) || isset($oldid)) {
$s[] .= Linker::linkKnown($title, wfMsg('currentrev'));
}
if ($wgUser->getNewtalk()) {
# do not show "You have new messages" text when we are viewing our
# own talk page
if (!$title->equals($wgUser->getTalkPage())) {
$tl = Linker::linkKnown($wgUser->getTalkPage(), wfMsgHtml('newmessageslink'), array(), array('redirect' => 'no'));
$dl = Linker::linkKnown($wgUser->getTalkPage(), wfMsgHtml('newmessagesdifflink'), array(), array('diff' => 'cur'));
$s[] = '<strong>' . wfMsg('youhavenewmessages', $tl, $dl) . '</strong>';
# disable caching
$wgOut->setSquidMaxage(0);
$wgOut->enableClientCache(false);
}
}
$undelete = $skin->getUndeleteLink();
if (!empty($undelete)) {
$s[] = $undelete;
}
return $wgLang->pipeList($s);
}