本文整理汇总了PHP中Skin::makeKnownLinkObj方法的典型用法代码示例。如果您正苦于以下问题:PHP Skin::makeKnownLinkObj方法的具体用法?PHP Skin::makeKnownLinkObj怎么用?PHP Skin::makeKnownLinkObj使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Skin
的用法示例。
在下文中一共展示了Skin::makeKnownLinkObj方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: formatResult
/**
* Format the result as a simple link to the page
*
* @param Skin $skin
* @param object $row Result row
* @return string
*/
public function formatResult($skin, $row)
{
global $wgContLang;
$title = Title::makeTitleSafe($row->namespace, $row->title);
return $skin->makeKnownLinkObj($title, htmlspecialchars($wgContLang->convert($title->getPrefixedText())));
}
示例2: makeWlhLink
/**
* Make a "what links here" link for a specified result if required
*
* @param Title $title Title to make the link for
* @param Skin $skin Skin to use
* @param object $result Result row
* @return string
*/
private function makeWlhLink($title, $skin, $result)
{
global $wgLang;
if ($this->nlinks) {
$wlh = SpecialPage::getTitleFor('Whatlinkshere');
$label = wfMsgExt('nlinks', array('parsemag', 'escape'), $wgLang->formatNum($result->value));
return $skin->makeKnownLinkObj($wlh, $label, 'target=' . $title->getPrefixedUrl());
} else {
return null;
}
}
示例3: buildTools
/**
* Build a set of links for convenient navigation
* between watchlist viewing and editing modes
*
* @param Skin $skin Skin to use
* @return string
*/
public static function buildTools($skin)
{
$tools = array();
$modes = array('view' => false, 'edit' => 'edit', 'raw' => 'raw');
foreach ($modes as $mode => $subpage) {
$tools[] = $skin->makeKnownLinkObj(SpecialPage::getTitleFor('Watchlist', $subpage), wfMsgHtml("watchlisttools-{$mode}"));
}
return implode(' | ', $tools);
}