當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。