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


PHP ChangesList::insertUserRelatedLinks方法代码示例

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


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

示例1: onChangesListInsertLogEntry

 /**
  * @brief Adjusting recent changes for Wall
  *
  * @desc This method creates comment about revision deletion of a message on message wall
  *
  * @param ChangesList $list
  * @param RecentChange $rc
  * @param String $s
  * @param Formatter $formatter
  * @param string $mark
  *
  * @return true because this is a hook
  *
  * @author Andrzej 'nAndy' Lukaszewski
  */
 public function onChangesListInsertLogEntry($list, $rc, &$s, $formatter, &$mark)
 {
     $app = F::app();
     if ($rc->getAttribute('rc_type') == RC_LOG && in_array(MWNamespace::getSubject($rc->getAttribute('rc_namespace')), $app->wg->WallNS) && in_array($rc->getAttribute('rc_log_action'), $this->rcWallActionTypes)) {
         $actionText = '';
         $wfMsgOptsBase = $this->getMessageOptions($rc);
         $wfMsgOpts = array($wfMsgOptsBase['articleUrl'], $wfMsgOptsBase['articleTitleTxt'], $wfMsgOptsBase['wallPageUrl'], $wfMsgOptsBase['wallPageName'], $wfMsgOptsBase['actionUser']);
         $msgType = $wfMsgOptsBase['isThread'] ? 'thread' : 'reply';
         //created in WallHooksHelper::getMessageOptions()
         //and there is not needed to be passed to wfMsg()
         unset($wfMsgOpts['isThread'], $wfMsgOpts['isNew']);
         switch ($rc->getAttribute('rc_log_action')) {
             case 'wall_remove':
                 $actionText = wfMsgExt($this->getMessagePrefix($rc->getAttribute('rc_namespace')) . '-removed-' . $msgType, array('parseinline'), $wfMsgOpts);
                 break;
             case 'wall_restore':
                 $actionText = wfMsgExt($this->getMessagePrefix($rc->getAttribute('rc_namespace')) . '-restored-' . $msgType, array('parseinline'), $wfMsgOpts);
                 break;
             case 'wall_admindelete':
                 $actionText = wfMsgExt($this->getMessagePrefix($rc->getAttribute('rc_namespace')) . '-deleted-' . $msgType, array('parseinline'), $wfMsgOpts);
                 break;
             case 'wall_archive':
                 $actionText = wfMsgExt($this->getMessagePrefix($rc->getAttribute('rc_namespace')) . '-closed-thread', array('parseinline'), $wfMsgOpts);
                 break;
             case 'wall_reopen':
                 $actionText = wfMsgExt($this->getMessagePrefix($rc->getAttribute('rc_namespace')) . '-reopened-thread', array('parseinline'), $wfMsgOpts);
                 break;
             default:
                 $actionText = wfMsg($this->getMessagePrefix($rc->getAttribute('rc_namespace')) . '-unrecognized-log-action', $wfMsgOpts);
                 break;
         }
         $s = '';
         $list->insertUserRelatedLinks($s, $rc);
         $s .= ' ' . $actionText . ' ' . $list->insertComment($rc);
     }
     return true;
 }
开发者ID:schwarer2006,项目名称:wikia,代码行数:52,代码来源:WallHooksHelper.class.php


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