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


PHP Skin::link方法代码示例

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


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

示例1: makeWlhLink

 /**
  * Make a "what links here" link for a given title
  *
  * @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;
     $wlh = SpecialPage::getTitleFor('Whatlinkshere');
     $label = wfMsgExt('nlinks', array('parsemag', 'escape'), $wgLang->formatNum($result->value));
     return $skin->link($wlh, $label, array(), array('target' => $title->getPrefixedText()));
 }
开发者ID:amjadtbssm,项目名称:website,代码行数:15,代码来源:SpecialWantedtemplates.php

示例2: setSubtitle

	/**
	 * Set a subtitle like "Manage > FreeCol (open source game) > German"
	 * based on group and language code. The language part is not shown if
	 * it is 'en', and all three possible parts of the subtitle are linked.
	 *
	 * @param $group MessageGroup
	 * @param $code \string Language code.
	 */
	protected function setSubtitle( $group, $code ) {
		global $wgLang;

		$links[] = $this->skin->link(
			$this->getTitle(),
			wfMsgHtml( 'translate-manage-subtitle' )
		);

		$links[] = $this->skin->link(
			$this->getTitle(),
			htmlspecialchars( $group->getLabel() ),
			array(),
			array( 'group' => $group->getId() )
		);

		// Do not show language part for English.
		if ( $code !== 'en' ) {
			$langname = TranslateUtils::getLanguageName( $code, false, $wgLang->getCode() );
			$links[] = $this->skin->link(
				$this->getTitle(),
				htmlspecialchars( $langname ),
				array(),
				array( 'group' => $group->getId(), 'language' => $code )
			);
		}

		$this->out->setSubtitle( implode( ' > ', $links ) );
	}
开发者ID:realsoc,项目名称:mediawiki-extensions,代码行数:36,代码来源:SpecialManageGroups.php

示例3: generateUndoLink

 /**
  * @param Skin $skin
  * @param Title $title
  * @param Revision $revision
  * @param Revision $undoAfterRevision
  * @return String Undo Link
  */
 public static function generateUndoLink($skin, $title, $revision, $undoAfterRevision)
 {
     if (!$revision instanceof Revision || !$undoAfterRevision instanceof Revision || !$title instanceof Title || !$skin instanceof Skin) {
         return null;
     }
     # Create undo tooltip for the first (=latest) line only
     $undoTooltip = $revision->isCurrent() ? array('title' => wfMsg('tooltip-undo')) : array();
     $undolink = $skin->link($title, wfMsgHtml('editundo'), $undoTooltip, array('action' => 'edit', 'undoafter' => $undoAfterRevision->getId(), 'undo' => $revision->getId()), array('known', 'noclasses'));
     return "<span class=\"mw-history-undo\">{$undolink}</span>";
 }
开发者ID:realsoc,项目名称:mediawiki-extensions,代码行数:17,代码来源:CollabWatchlistChangesList.php

示例4: authorLink

 function authorLink($author, $extraParams = array())
 {
     $repo = $this->mRepo->getName();
     $special = SpecialPage::getTitleFor('Code', "{$repo}/author/{$author}");
     return $this->skin->link($special, htmlspecialchars($author), array(), $extraParams);
 }
开发者ID:yusufchang,项目名称:app,代码行数:6,代码来源:CodeView.php

示例5: drawCategoryBrowser

 function drawCategoryBrowser($tree, &$skin, $count = 0)
 {
     $return = '';
     $viewMode = WikihowCategoryViewer::getViewModeArray($this->getContext());
     foreach ($tree as $element => $parent) {
         /*
         if ($element == "Category:WikiHow" ||
         	$element == "Category:Featured-Articles" ||
         	$element == "Category:Honors") {
         		continue;
         }
         */
         $count++;
         $start = ' ' . self::BREADCRUMB_SEPARATOR;
         /*
         //not too many...
         if ($count > self::BREADCRUMB_LIMIT && !self::$bShortened) {
         	$return .= '<li class="bread_ellipsis"><span>'.$start.'</span> ... </li>';
         	self::$bShortened = true;
         	break;
         }
         */
         $eltitle = Title::NewFromText($element);
         if (empty($parent)) {
             # element start a new list
             $return .= "\n";
         } else {
             # grab the others elements
             $return .= $this->drawCategoryBrowser($parent, $skin, $count);
         }
         # add our current element to the list
         $return .= "<li>{$start} " . Skin::link($eltitle, $eltitle->getText(), array(), $viewMode) . "</li>";
     }
     return $return;
 }
开发者ID:biribogos,项目名称:wikihow-src,代码行数:35,代码来源:WikiHowSkin.php

示例6: formatResult

 /**
  *
  * @param Skin $skin
  * @param File $result
  * @return string
  */
 function formatResult($skin, $result)
 {
     global $wgContLang, $wgLang;
     $nt = $result->getTitle();
     $text = $wgContLang->convert($nt->getText());
     $plink = $skin->link(Title::newFromText($nt->getPrefixedText()), $text);
     $userText = $result->getUser('text');
     $user = $skin->link(Title::makeTitle(NS_USER, $userText), $userText);
     $time = $wgLang->timeanddate($result->getTimestamp());
     return "{$plink} . . {$user} . . {$time}";
 }
开发者ID:eFFemeer,项目名称:seizamcore,代码行数:17,代码来源:SpecialFileDuplicateSearch.php


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