本文整理汇总了PHP中Linker::blockLink方法的典型用法代码示例。如果您正苦于以下问题:PHP Linker::blockLink方法的具体用法?PHP Linker::blockLink怎么用?PHP Linker::blockLink使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Linker
的用法示例。
在下文中一共展示了Linker::blockLink方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: onLogLine
public static function onLogLine($logType, $logaction, $title, $paramArray, &$comment, &$revert, $logTimestamp)
{
global $wgUser, $wgCityId;
if (strpos($logaction, 'chatban') === 0) {
$user = User::newFromId($paramArray[1]);
if (!empty($user) && Chat::getBanInformation($wgCityId, $user) !== false && $wgUser->isAllowed('chatmoderator')) {
$revert = "(" . "<a class='chat-change-ban' data-user-id='{$paramArray[1]}' href='#'>" . wfMsg('chat-ban-log-change-ban-link') . "</a>" . ")";
}
} elseif ($logaction === 'chatconnect' && !empty($paramArray)) {
$ipLinks = array();
if ($wgUser->isAllowed('multilookup')) {
$mlTitle = GlobalTitle::newFromText('MultiLookup', NS_SPECIAL, 177);
// Need to make the link manually for this as Linker's normaliseSpecialPage
// makes the link local if the special page exists locally, rather than
// keeping the global title
$ipLinks[] = Xml::tags('a', array('href' => $mlTitle->getFullURL('target=' . urlencode($paramArray[0]))), wfMessage('multilookup')->escaped());
$ipLinks[] = Linker::makeKnownLinkObj(GlobalTitle::newFromText('Phalanx', NS_SPECIAL, 177), wfMessage('phalanx')->escaped(), wfArrayToCGI(array('type' => '8', 'target' => $paramArray[0], 'wpPhalanxCheckBlocker' => $paramArray[0])));
$ipLinks[] = Linker::blockLink(0, $paramArray[0]);
$revert = '(' . implode(wfMessage('pipe-separator')->plain(), $ipLinks) . ')';
}
}
return true;
}
示例2: blockLink
public function blockLink($userId, $userText)
{
return Linker::blockLink($userId, $userText);
}