当前位置: 首页>>代码示例>>PHP>>正文


PHP Linker::getInternalLinkAttributes方法代码示例

本文整理汇总了PHP中Linker::getInternalLinkAttributes方法的典型用法代码示例。如果您正苦于以下问题:PHP Linker::getInternalLinkAttributes方法的具体用法?PHP Linker::getInternalLinkAttributes怎么用?PHP Linker::getInternalLinkAttributes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Linker的用法示例。


在下文中一共展示了Linker::getInternalLinkAttributes方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getInternalLinkAttributes

 /**
  * @deprecated since 1.27
  */
 public function getInternalLinkAttributes($title, $unused = null, $class = '')
 {
     wfDeprecated(__METHOD__, '1.27');
     return Linker::getInternalLinkAttributes($title, $unused, $class);
 }
开发者ID:claudinec,项目名称:galan-wiki,代码行数:8,代码来源:DummyLinker.php

示例2: pageTitleLinks

 function pageTitleLinks()
 {
     global $wgOut, $wgUser, $wgRequest, $wgLang;
     $oldid = $wgRequest->getVal('oldid');
     $diff = $wgRequest->getVal('diff');
     $action = $wgRequest->getText('action');
     $skin = $this->getSkin();
     $title = $skin->getTitle();
     $s[] = $this->printableLink();
     $disclaimer = $skin->disclaimerLink();
     # may be empty
     if ($disclaimer) {
         $s[] = $disclaimer;
     }
     $privacy = $skin->privacyLink();
     # may be empty too
     if ($privacy) {
         $s[] = $privacy;
     }
     if ($wgOut->isArticleRelated()) {
         if ($title->getNamespace() == NS_FILE) {
             $name = $title->getDBkey();
             $image = wfFindFile($title);
             if ($image) {
                 $link = htmlspecialchars($image->getURL());
                 $style = Linker::getInternalLinkAttributes($link, $name);
                 $s[] = "<a href=\"{$link}\"{$style}>{$name}</a>";
             }
         }
     }
     if ('history' == $action || isset($diff) || isset($oldid)) {
         $s[] .= Linker::linkKnown($title, wfMsg('currentrev'));
     }
     if ($wgUser->getNewtalk()) {
         # do not show "You have new messages" text when we are viewing our
         # own talk page
         if (!$title->equals($wgUser->getTalkPage())) {
             $tl = Linker::linkKnown($wgUser->getTalkPage(), wfMsgHtml('newmessageslink'), array(), array('redirect' => 'no'));
             $dl = Linker::linkKnown($wgUser->getTalkPage(), wfMsgHtml('newmessagesdifflink'), array(), array('diff' => 'cur'));
             $s[] = '<strong>' . wfMsg('youhavenewmessages', $tl, $dl) . '</strong>';
             # disable caching
             $wgOut->setSquidMaxage(0);
             $wgOut->enableClientCache(false);
         }
     }
     $undelete = $skin->getUndeleteLink();
     if (!empty($undelete)) {
         $s[] = $undelete;
     }
     return $wgLang->pipeList($s);
 }
开发者ID:Tjorriemorrie,项目名称:app,代码行数:51,代码来源:SkinLegacy.php


注:本文中的Linker::getInternalLinkAttributes方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。