本文整理汇总了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;
}
示例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'), ' ');
$this->output->addHTML($finishDiv . Xml::CloseElement('div'));
}