本文整理汇总了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__);
}
示例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']));
}
}
}