本文整理匯總了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);
}