當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Skin::makeKnownLinkObj方法代碼示例

本文整理匯總了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())));
 }
開發者ID:BackupTheBerlios,項目名稱:shoutwiki-svn,代碼行數:13,代碼來源:PageQueryPage.php

示例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;
     }
 }
開發者ID:Jobava,項目名稱:diacritice-meta-repo,代碼行數:19,代碼來源:SpecialWantedpages.php

示例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);
 }
開發者ID:BackupTheBerlios,項目名稱:shoutwiki-svn,代碼行數:16,代碼來源:WatchlistEditor.php


注:本文中的Skin::makeKnownLinkObj方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。