本文整理汇总了PHP中DifferenceEngine::getPatrolledLink方法的典型用法代码示例。如果您正苦于以下问题:PHP DifferenceEngine::getPatrolledLink方法的具体用法?PHP DifferenceEngine::getPatrolledLink怎么用?PHP DifferenceEngine::getPatrolledLink使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DifferenceEngine
的用法示例。
在下文中一共展示了DifferenceEngine::getPatrolledLink方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: showFooter
/**
* Render the footer including userinfos (Name, Role, Editcount)
*/
function showFooter()
{
$output = $this->getOutput();
$output->addHtml(Html::openElement('div', array('id' => 'mw-mf-userinfo', 'class' => 'position-fixed')) . Html::openElement('div', array('class' => 'post-content')));
$userId = $this->rev->getUser();
if ($userId) {
$user = User::newFromId($userId);
$edits = $user->getEditCount();
$attrs = array('class' => MobileUI::iconClass('user', 'before', 'mw-mf-user icon-16px'), 'data-revision-id' => $this->revId, 'data-user-name' => $user->getName(), 'data-user-gender' => $user->getOption('gender'));
$output->addHtml(Html::openElement('div', $attrs) . Linker::link($user->getUserPage(), htmlspecialchars($user->getName()), array('class' => 'mw-mf-user-link')) . '</div>' . '<div class="mw-mf-roles meta">' . $this->listGroups($user) . '</div>' . '<div class="mw-mf-edit-count meta">' . $this->msg('mobile-frontend-diffview-editcount', $this->getLanguage()->formatNum($edits))->parse() . '</div>');
} else {
$ipAddr = $this->rev->getUserText();
$userPage = SpecialPage::getTitleFor('Contributions', $ipAddr);
$output->addHtml(Html::element('div', array('class' => MobileUI::iconClass('anonymous', 'before', 'mw-mf-user icon-16px mw-mf-anon')), $this->msg('mobile-frontend-diffview-anonymous')) . '<div>' . Linker::link($userPage, htmlspecialchars($ipAddr)) . '</div>');
}
if ($this->mDiffEngine instanceof InlineDifferenceEngine) {
$output->addHtml($this->mDiffEngine->getPatrolledLink());
}
$output->addHtml(Html::closeElement('div') . Html::closeElement('div'));
}