本文整理匯總了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();
}