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


PHP Message::rawParam方法代码示例

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


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

示例1: getMessageParameters

 public function getMessageParameters()
 {
     $params = parent::getMessageParameters();
     $type = $this->entry->getFullType();
     if ($type === 'translationreview/message') {
         $targetPage = $this->makePageLink($this->entry->getTarget(), array('oldid' => $params[3]));
         $params[2] = Message::rawParam($targetPage);
     } elseif ($type === 'translationreview/group') {
         /*
          * - 3: language code
          * - 4: label of the message group
          * - 5: old state
          * - 6: new state
          */
         $uiLanguage = $this->context->getLanguage();
         $language = $params[3];
         $targetPage = $this->makePageLinkWithText($this->entry->getTarget(), $params[4], array('language' => $language));
         $params[2] = Message::rawParam($targetPage);
         $params[3] = TranslateUtils::getLanguageName($language, $uiLanguage->getCode());
         $params[5] = $this->formatStateMessage($params[5]);
         $params[6] = $this->formatStateMessage($params[6]);
     } elseif ($type === 'translatorsandbox/rejected') {
         // No point linking to the user page which cannot have existed
         $params[2] = $this->entry->getTarget()->getText();
     } elseif ($type === 'translatorsandbox/promoted') {
         // Gender for the target
         $params[3] = User::newFromId($params[3])->getName();
     }
     return $params;
 }
开发者ID:HuijiWiki,项目名称:mediawiki-extensions-Translate,代码行数:30,代码来源:TranslateLogFormatter.php

示例2: getMessageParameters

 protected function getMessageParameters()
 {
     $params = parent::getMessageParameters();
     /* Current format:
      * 1,2,3: normal logformatter params
      * 4: old username
      *    (legaciest doesn't have this at all, all in comment)
      *    (legacier uses this as new name and stores old name in target)
      * 5: new username
      * 6: number of edits the user had at the time
      *    (not available except in newest log entries)
      * Note that the arrays are zero-indexed, while message parameters
      * start from 1, so substract one to get array entries below.
      */
     if (!isset($params[3])) {
         // The oldest format
         return $params;
     } elseif (!isset($params[4])) {
         // See comments above
         $params[4] = $params[3];
         $params[3] = $this->entry->getTarget()->getText();
     }
     // Nice link to old user page
     $title = Title::makeTitleSafe(NS_USER, $params[3]);
     $link = $this->myPageLink($title, $params[3]);
     $params[3] = Message::rawParam($link);
     // Nice link to new user page
     $title = Title::makeTitleSafe(NS_USER, $params[4]);
     $link = $this->myPageLink($title, $params[4]);
     $params[4] = Message::rawParam($link);
     return $params;
 }
开发者ID:eliagbayani,项目名称:LiteratureEditor,代码行数:32,代码来源:RenameuserLogFormatter.php

示例3: getMessageParameters

 /**
  * @return array
  */
 protected function getMessageParameters()
 {
     $entry = $this->entry->getParameters();
     $params = parent::getMessageParameters();
     $filter_title = SpecialPage::getTitleFor('AbuseFilter', $entry['filter']);
     $filter_caption = $this->msg('abusefilter-log-detailedentry-local')->params($entry['filter']);
     $log_title = SpecialPage::getTitleFor('AbuseLog', $entry['log']);
     $log_caption = $this->msg('abusefilter-log-detailslink');
     $params[4] = $entry['action'];
     if ($this->plaintext) {
         $params[3] = '[[' . $filter_title->getPrefixedText() . '|' . $filter_caption . ']]';
         $params[8] = '[[' . $log_title->getPrefixedText() . '|' . $log_caption . ']]';
     } else {
         $params[3] = Message::rawParam(Linker::link($filter_title, htmlspecialchars($filter_caption)));
         $params[8] = Message::rawParam(Linker::link($log_title, htmlspecialchars($log_caption)));
     }
     $actions_taken = $entry['actions'];
     if (!strlen(trim($actions_taken))) {
         $actions_taken = $this->msg('abusefilter-log-noactions');
     } else {
         $actions = explode(',', $actions_taken);
         $displayActions = array();
         foreach ($actions as $action) {
             $displayActions[] = AbuseFilter::getActionDisplay($action);
         }
         $actions_taken = $this->context->getLanguage()->commaList($displayActions);
     }
     $params[5] = $actions_taken;
     // Bad things happen if the numbers are not in correct order
     ksort($params);
     return $params;
 }
开发者ID:biribogos,项目名称:wikihow-src,代码行数:35,代码来源:AbuseLogHitFormatter.php

示例4: getMessageParameters

 protected function getMessageParameters()
 {
     $params = parent::getMessageParameters();
     $subtype = $this->entry->getSubtype();
     if ($subtype === 'protect' || $subtype === 'modify') {
         $rawParams = $this->entry->getParameters();
         if (isset($rawParams['details'])) {
             $params[3] = $this->createProtectDescription($rawParams['details']);
         } elseif (isset($params[3])) {
             // Old way of Restrictions and expiries
             $params[3] = $this->context->getLanguage()->getDirMark() . $params[3];
         } else {
             // Very old way (nothing set)
             $params[3] = '';
         }
         // Cascading flag
         if (isset($params[4])) {
             // handled in getMessageKey
             unset($params[4]);
         }
     } elseif ($subtype === 'move_prot') {
         $oldname = $this->makePageLink(Title::newFromText($params[3]), array('redirect' => 'no'));
         $params[3] = Message::rawParam($oldname);
     }
     return $params;
 }
开发者ID:mb720,项目名称:mediawiki,代码行数:26,代码来源:ProtectLogFormatter.php

示例5: getMessageParameters

 protected function getMessageParameters()
 {
     $params = parent::getMessageParameters();
     $title = $this->entry->getTarget();
     if (substr($title->getText(), 0, 1) === '#') {
         // autoblock - no user link possible
         $params[2] = $title->getText();
         $params[3] = '';
         // no user name for gender use
     } else {
         // Create a user link for the blocked
         $username = $title->getText();
         // @todo Store the user identifier in the parameters
         // to make this faster for future log entries
         $targetUser = User::newFromName($username, false);
         $params[2] = Message::rawParam($this->makeUserLink($targetUser, Linker::TOOL_LINKS_NOBLOCK));
         $params[3] = $username;
         // plain user name for gender use
     }
     $subtype = $this->entry->getSubtype();
     if ($subtype === 'block' || $subtype === 'reblock') {
         if (!isset($params[4])) {
             // Very old log entry without duration: means infinite
             $params[4] = 'infinite';
         }
         // Localize the duration, and add a tooltip
         // in English to help visitors from other wikis.
         // The lrm is needed to make sure that the number
         // is shown on the correct side of the tooltip text.
         $durationTooltip = '‎' . htmlspecialchars($params[4]);
         $params[4] = Message::rawParam("<span class='blockExpiry' title='{$durationTooltip}'>" . $this->context->getLanguage()->translateBlockExpiry($params[4]) . '</span>');
         $params[5] = isset($params[5]) ? self::formatBlockFlags($params[5], $this->context->getLanguage()) : '';
     }
     return $params;
 }
开发者ID:Acidburn0zzz,项目名称:mediawiki,代码行数:35,代码来源:BlockLogFormatter.php

示例6: formatLogEntry

 static function formatLogEntry($type, $action, $title, $sk, $parameters)
 {
     $msg = "lqt-log-action-{$action}";
     switch ($action) {
         case 'merge':
             if ($parameters[0]) {
                 $msg = 'lqt-log-action-merge-across';
             } else {
                 $msg = 'lqt-log-action-merge-down';
             }
             break;
         case 'move':
             $smt = new SpecialMoveThread();
             $rightsCheck = $smt->checkUserRights($parameters[1] instanceof Title ? $parameters[1] : Title::newFromText($parameters[1]), $parameters[0] instanceof Title ? $parameters[0] : Title::newFromText($parameters[0]));
             if ($rightsCheck === true) {
                 $parameters[] = Message::rawParam(Linker::link(SpecialPage::getTitleFor('MoveThread', $title), wfMessage('revertmove')->text(), array(), array('dest' => $parameters[0])));
             } else {
                 $parameters[] = '';
             }
             break;
         default:
             // Give grep a chance to find the usages:
             // lqt-log-action-move, lqt-log-action-split, lqt-log-action-subjectedit,
             // lqt-log-action-resort, lqt-log-action-signatureedit
             $msg = "lqt-log-action-{$action}";
             break;
     }
     array_unshift($parameters, $title->getPrefixedText());
     $html = wfMessage($msg, $parameters);
     if ($sk === null) {
         return StringUtils::delimiterReplace('<', '>', '', $html->inContentLanguage()->parse());
     }
     return $html->parse();
 }
开发者ID:Rikuforever,项目名称:wiki,代码行数:34,代码来源:LogFormatter.php

示例7: getMessageParameters

 public function getMessageParameters()
 {
     $params = parent::getMessageParameters();
     $type = $this->entry->getSubtype();
     $entry_params = $this->entry->getParameters();
     if ($type === 'approve') {
         $revid = $entry_params['revid'];
         $link = Linker::linkKnown($this->entry->getTarget(), wfMessage('moderation-log-diff', $revid)->text(), array('title' => wfMessage('tooltip-moderation-approved-diff')), array('diff' => $revid));
         $params[4] = Message::rawParam($link);
     } elseif ($type === 'reject') {
         $modid = $entry_params['modid'];
         $link = Linker::linkKnown(Title::makeTitle(NS_SPECIAL, "Moderation"), wfMessage('moderation-log-change', $modid)->text(), array('title' => wfMessage('tooltip-moderation-rejected-change')), array('modaction' => 'show', 'modid' => $modid));
         $params[4] = Message::rawParam($link);
         $userlink = Linker::userLink($entry_params['user'], $entry_params['user_text']);
         $params[5] = Message::rawParam($userlink);
     } elseif ($type === 'merge') {
         $revid = $entry_params['revid'];
         $modid = $entry_params['modid'];
         $link = Linker::linkKnown(Title::makeTitle(NS_SPECIAL, "Moderation"), wfMessage('moderation-log-change', $modid)->text(), array('title' => wfMessage('tooltip-moderation-rejected-change')), array('modaction' => 'show', 'modid' => $modid));
         $params[4] = Message::rawParam($link);
         $link = Linker::linkKnown($this->entry->getTarget(), wfMessage('moderation-log-diff', $revid)->text(), array('title' => wfMessage('tooltip-moderation-approved-diff')), array('diff' => $revid));
         $params[5] = Message::rawParam($link);
     } elseif ($type === 'approveall' || $type === 'rejectall' || $type === 'block' || $type === 'unblock') {
         $title = $this->entry->getTarget();
         $user_id = User::idFromName($title->getText());
         $link = Linker::userLink($user_id, $title->getText());
         $params[2] = Message::rawParam($link);
     }
     return $params;
 }
开发者ID:ATCARES,项目名称:mediawiki-moderation,代码行数:30,代码来源:ModerationLogFormatter.php

示例8: getLocalWikiLink

 protected function getLocalWikiLink($name, $wiki)
 {
     $text = "User:{$name}@{$wiki}";
     if ($this->plaintext) {
         return "[[{$text}]]";
     }
     return Message::rawParam(WikiMap::foreignUserLink($wiki, $name, $text));
 }
开发者ID:NDKilla,项目名称:mediawiki-extensions-CentralAuth,代码行数:8,代码来源:GlobalRenameLogFormatter.php

示例9: getMessageParameters

	protected function getMessageParameters() {
		$params = parent::getMessageParameters();
		$oldname = $this->makePageLink( $this->entry->getTarget(), array( 'redirect' => 'no' ) );
		$newname = $this->makePageLink( Title::newFromText( $params[3] ) );
		$params[2] = Message::rawParam( $oldname );
		$params[3] = Message::rawParam( $newname );
		return $params;
	}
开发者ID:nahoj,项目名称:mediawiki_ynh,代码行数:8,代码来源:MoveLogFormatter.php

示例10: getMessageParameters

 protected function getMessageParameters()
 {
     $params = parent::getMessageParameters();
     $oldname = $this->makePageLink($this->entry->getTarget(), array('redirect' => 'no'));
     $newname = $this->makePageLink(Title::newFromText($params[3]));
     $params[2] = Message::rawParam($oldname);
     $params[3] = Message::rawParam($newname);
     $params[4] = $this->context->getLanguage()->userTimeAndDate($params[4], $this->context->getUser());
     return $params;
 }
开发者ID:MediaWiki-stable,项目名称:1.26.1,代码行数:10,代码来源:MergeLogFormatter.php

示例11: getMessageParameters

 protected function getMessageParameters()
 {
     $params = parent::getMessageParameters();
     $subtype = $this->entry->getSubtype();
     if ($subtype === 'requestwiki') {
         $params[6] = str_replace('#', '', $params[6]);
         $params[6] = Message::rawParam(Linker::linkKnown(Title::newFromText(SpecialPage::getTitleFor('RequestWikiQueue') . '/' . $params[6]), '#' . $params[6]));
         return $params;
     }
 }
开发者ID:reviforks,项目名称:miraheze-cw,代码行数:10,代码来源:CreateWikiLogFormatter.php

示例12: getMessageParameters

 protected function getMessageParameters()
 {
     $params = parent::getMessageParameters();
     $subtype = $this->entry->getSubtype();
     if ($subtype === 'move_prot') {
         $oldname = $this->makePageLink(Title::newFromText($params[3]), array('redirect' => 'no'));
         $params[3] = Message::rawParam($oldname);
     }
     return $params;
 }
开发者ID:MediaWiki-stable,项目名称:1.26.1,代码行数:10,代码来源:ProtectLogFormatter.php

示例13: getMessageParameters

 protected function getMessageParameters()
 {
     parent::getMessageParameters();
     $params = $this->extractParameters();
     $lang = $this->context->getLanguage();
     $this->parsedParameters[3] = Message::rawParam($lang->commaList(array_map(array($this, 'getCentralAuthLink'), explode('|', $params[3]))));
     $this->parsedParameters[4] = Message::rawParam($this->getCentralAuthLink($params[4]));
     ksort($this->parsedParameters);
     return $this->parsedParameters;
 }
开发者ID:NDKilla,项目名称:mediawiki-extensions-CentralAuth,代码行数:10,代码来源:GlobalUserMergeLogFormatter.php

示例14: getMessageParameters

	protected function getMessageParameters() {
		$params = parent::getMessageParameters();
		$subtype = $this->entry->getSubtype();
		if ( $subtype === 'create2' || $subtype === 'byemail' ) {
			if ( isset( $params[3] ) ) {
				$target = User::newFromId( $params[3] );
			} else {
				$target = User::newFromName( $this->entry->getTarget()->getText(), false );
			}
			$params[2] = Message::rawParam( $this->makeUserLink( $target ) );
			$params[3] = $target->getName();
		}
		return $params;
	}
开发者ID:nahoj,项目名称:mediawiki_ynh,代码行数:14,代码来源:NewUsersLogFormatter.php

示例15: getMessageParameters

 protected function getMessageParameters()
 {
     $params = parent::getMessageParameters();
     $target = $this->entry->getTarget();
     $oldid = $params[3];
     $revision = $this->context->getLanguage()->formatNum($oldid, true);
     if ($this->plaintext) {
         $revlink = $revision;
     } elseif ($target->exists()) {
         $query = array('oldid' => $oldid, 'diff' => 'prev');
         $revlink = Linker::link($target, htmlspecialchars($revision), array(), $query);
     } else {
         $revlink = htmlspecialchars($revision);
     }
     $params[3] = Message::rawParam($revlink);
     return $params;
 }
开发者ID:eliagbayani,项目名称:LiteratureEditor,代码行数:17,代码来源:PatrolLogFormatter.php


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