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


PHP Xml::CloseElement方法代码示例

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


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

示例1: makeTargetList

 public function makeTargetList()
 {
     global $wgUser;
     $sk = $wgUser->getSkin();
     $targets = $this->getTargets();
     $list = Xml::openElement('ul');
     foreach ($targets as $t) {
         $link = $sk->link($t, $t->getPrefixedText(), array(), array(), array('known', 'noclasses'));
         $list .= Xml::tags('li', null, $link);
     }
     $list .= Xml::CloseElement('ul');
     return $list;
 }
开发者ID:realsoc,项目名称:mediawiki-extensions,代码行数:13,代码来源:IndexFunction_body.php

示例2: showThreadReplies

 /**
  * @param $thread Thread
  * @param $startAt
  * @param $maxCount
  * @param $showThreads
  * @param $cascadeOptions
  * @param $interruption bool
  */
 function showThreadReplies($thread, $startAt, $maxCount, $showThreads, $cascadeOptions, $interruption = false)
 {
     $repliesClass = 'lqt-thread-replies lqt-thread-replies-' . $this->threadNestingLevel;
     if ($interruption) {
         $repliesClass .= ' lqt-thread-replies-interruption';
     }
     $div = Xml::openElement('div', array('class' => $repliesClass));
     $subthreadCount = count($thread->subthreads());
     $i = 0;
     $showCount = 0;
     $showThreads = true;
     $mustShowThreads = $cascadeOptions['mustShowThreads'];
     $replies = $thread->subthreads();
     usort($replies, array('Thread', 'createdSortCallback'));
     foreach ($replies as $st) {
         ++$i;
         // Only show undeleted threads that are above our 'startAt' index.
         $shown = false;
         if ($st->type() != Threads::TYPE_DELETED && $i >= $startAt && $showThreads) {
             if ($showCount > $maxCount && $maxCount > 0) {
                 // We've shown too many threads.
                 $link = $this->getShowMore($thread, $st, $i);
                 $this->output->addHTML($div . $link . '</div>');
                 $showThreads = false;
                 continue;
             }
             ++$showCount;
             if ($showCount == 1) {
                 // There's a post sep before each reply group to
                 //	separate from the parent thread.
                 $this->output->addHTML($div);
             }
             $this->showThread($st, $i, $subthreadCount, $cascadeOptions);
             $shown = true;
         }
         // Handle must-show threads.
         // FIXME this thread will be duplicated if somebody clicks the
         //	"show more" link (probably needs fixing in the JS)
         if ($st->type() != Threads::TYPE_DELETED && !$shown && array_key_exists($st->id(), $mustShowThreads)) {
             $this->showThread($st, $i, $subthreadCount, $cascadeOptions);
         }
     }
     // Show reply stuff
     $this->showReplyBox($thread);
     $finishDiv = '';
     $finishDiv .= Xml::tags('div', array('class' => 'lqt-replies-finish'), '&#160;');
     $this->output->addHTML($finishDiv . Xml::CloseElement('div'));
 }
开发者ID:Rikuforever,项目名称:wiki,代码行数:56,代码来源:View.php


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