本文整理汇总了PHP中TabController::getDebateTabs方法的典型用法代码示例。如果您正苦于以下问题:PHP TabController::getDebateTabs方法的具体用法?PHP TabController::getDebateTabs怎么用?PHP TabController::getDebateTabs使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TabController
的用法示例。
在下文中一共展示了TabController::getDebateTabs方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: DebateHistoryAction
public function DebateHistoryAction()
{
$debateModel = new DebateModel();
$request = Project::getRequest();
$user = Project::getUser()->getDbUser();
if (!$user->id) {
$user->id = 0;
}
$isAdmin = $user->user_type_id == 1 ? true : false;
$this->_view->assign('isAdmin', $isAdmin);
// PAGER
$record_per_page = $this->getParam("HISTORY_PER_PAGE");
$pager_view = new SitePagerView();
$record_count = $debateModel->getDebateHistoryCount();
$pages_number = $pager_view->getPagesNumber($record_count, $record_per_page);
$current_page_number = $request->getKeyByNumber(0);
$debate_pager = $pager_view->show3('Debate', 'DebateHistory', array(), $pages_number, $current_page_number);
$this->_view->assign('debate_pager', $debate_pager);
$page_settings = array("record_per_page" => $record_per_page, "current_page_number" => $current_page_number + 1);
// END PAGER
$aDebateHistory = $debateModel->getDebateHistory($page_settings, "start_time DESC");
$this->_view->assign('aDebateHistory', $aDebateHistory);
if ($user->id) {
$this->_view->assign('tab_list', TabController::getDebateTabs($isAdmin, false, false, true));
// Show tabs
}
$this->_view->HistoryPage();
$this->_view->parse();
}