本文整理汇总了PHP中Skin::makeLinkObj方法的典型用法代码示例。如果您正苦于以下问题:PHP Skin::makeLinkObj方法的具体用法?PHP Skin::makeLinkObj怎么用?PHP Skin::makeLinkObj使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Skin
的用法示例。
在下文中一共展示了Skin::makeLinkObj方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: formatResult
/**
* Format an individual result
*
* @param Skin $skin Skin to use for UI elements
* @param object $result Result row
* @return string
*/
public function formatResult($skin, $result)
{
$title = Title::makeTitleSafe($result->namespace, $result->title);
if ($title instanceof Title) {
if ($this->isCached()) {
$pageLink = $title->exists() ? '<s>' . $skin->makeLinkObj($title) . '</s>' : $skin->makeBrokenLinkObj($title);
} else {
$pageLink = $skin->makeBrokenLinkObj($title);
}
return wfSpecialList($pageLink, $this->makeWlhLink($title, $skin, $result));
} else {
$tsafe = htmlspecialchars($result->title);
return "Invalid title in result set; {$tsafe}";
}
}
示例2: formatResult
/**
* Format a result row
*
* @param Skin $skin Skin to use for UI elements
* @param object $result Result row
* @return string
*/
public function formatResult($skin, $result)
{
$title = Title::makeTitleSafe($result->namespace, $result->title);
if ($title instanceof Title) {
return wfSpecialList($skin->makeLinkObj($title), $this->makeWlhLink($title, $skin, $result));
} else {
$tsafe = htmlspecialchars($result->title);
return "Invalid title in result set; {$tsafe}";
}
}
示例3: formatResult
/**
* Format a result row
*
* @param Skin $skin Skin to use for UI elements
* @param object $result Result row
* @return string
*/
public function formatResult($skin, $result)
{
$title = Title::makeTitleSafe($result->namespace, $result->title);
$skin->link($title);
return wfSpecialList($skin->makeLinkObj($title), $this->makeWlhLink($title, $skin, $result));
}
示例4: buildRemoveLine
/**
* Build a single list item containing a check box selecting a title
* and a link to that title, with various additional bits
*
* @param Title $title
* @param bool $redirect
* @param Skin $skin
* @return string
*/
private function buildRemoveLine($title, $redirect, $skin)
{
$link = $skin->makeLinkObj($title);
if ($redirect) {
$link = '<span class="watchlistredir">' . $link . '</span>';
}
$tools[] = $skin->makeLinkObj($title->getTalkPage(), wfMsgHtml('talkpagelinktext'));
if ($title->exists()) {
$tools[] = $skin->makeKnownLinkObj($title, wfMsgHtml('history_short'), 'action=history');
}
if ($title->getNamespace() == NS_USER && !$title->isSubpage()) {
$tools[] = $skin->makeKnownLinkObj(SpecialPage::getTitleFor('Contributions', $title->getText()), wfMsgHtml('contributions'));
}
return '<li>' . Xml::check('titles[]', false, array('value' => $title->getPrefixedText())) . $link . ' (' . implode(' | ', $tools) . ')' . '</li>';
}