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


PHP Skin::makeLinkObj方法代碼示例

本文整理匯總了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}";
     }
 }
開發者ID:Jobava,項目名稱:diacritice-meta-repo,代碼行數:22,代碼來源:SpecialWantedpages.php

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

示例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));
 }
開發者ID:amjadtbssm,項目名稱:website,代碼行數:13,代碼來源:SpecialMostlinkedtemplates.php

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


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