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


PHP Forum::getBoardList方法代码示例

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


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

示例1: removeBoardModal

 public function removeBoardModal()
 {
     wfProfileIn(__METHOD__);
     if (!$this->wg->User->isAllowed('forumadmin')) {
         $this->displayRestrictionError();
         wfProfileOut(__METHOD__);
         return false;
         // skip rendering
     }
     $boardId = $this->getVal('boardId', -1);
     $board = ForumBoard::newFromId($boardId);
     if (empty($board)) {
         WikiaLogger::instance()->error('Error reporter: failed to find board', ['jiraTicket' => 'SOC-590', 'boardId' => $boardId, 'method' => __METHOD__]);
         $this->response->setCode(404);
         return true;
     }
     $boardTitle = $board->getTitle()->getText();
     $forum = new Forum();
     $list = $forum->getBoardList();
     $this->destinationBoards = array(array('value' => '', 'content' => wfMessage('forum-board-destination-empty')->escaped()));
     foreach ($list as $value) {
         if ($boardId != $value['id']) {
             $this->destinationBoards[] = array('value' => $value['id'], 'content' => htmlspecialchars($value['name']));
         }
     }
     $this->setVal('title', wfMessage('forum-admin-delete-and-merge-board-modal-heading', $boardTitle)->plain());
     $this->setVal('submitLabel', wfMessage('forum-admin-delete-and-merge-button-label')->plain());
     $form = array('inputs' => array(array('type' => 'text', 'name' => 'boardTitle', 'isRequired' => true, 'label' => wfMessage('forum-admin-delete-board-title')->plain()), array('type' => 'custom', 'output' => wfMessage('forum-admin-merge-board-warning')->plain()), array('type' => 'select', 'name' => 'destinationBoardId', 'class' => 'destinationBoardId', 'isRequired' => true, 'label' => wfMessage('forum-admin-merge-board-destination', $boardTitle)->plain(), 'options' => $this->destinationBoards)), 'method' => 'post', 'action' => '');
     $this->setVal('html', $this->app->renderView('WikiaStyleGuideForm', 'index', array('form' => $form)));
     wfProfileOut(__METHOD__);
 }
开发者ID:yusufchang,项目名称:app,代码行数:31,代码来源:ForumSpecialController.class.php

示例2: boardNewThread

 public function boardNewThread()
 {
     parent::newMessage();
     $this->isTopicPage = $this->getVal('isTopicPage', false);
     if ($this->isTopicPage) {
         $forum = new Forum();
         $list = $forum->getBoardList();
         $this->destinationBoards = array(array('value' => '', 'content' => wfMessage('forum-board-destination-empty')->escaped()));
         foreach ($list as $value) {
             $this->destinationBoards[] = array('value' => htmlspecialchars($value['name']), 'content' => htmlspecialchars($value['name']));
         }
     }
 }
开发者ID:Tjorriemorrie,项目名称:app,代码行数:13,代码来源:ForumController.class.php


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