本文整理汇总了PHP中kshowPeer::getOrderedPager方法的典型用法代码示例。如果您正苦于以下问题:PHP kshowPeer::getOrderedPager方法的具体用法?PHP kshowPeer::getOrderedPager怎么用?PHP kshowPeer::getOrderedPager使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类kshowPeer
的用法示例。
在下文中一共展示了kshowPeer::getOrderedPager方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: execute
public function execute()
{
$this->forceSystemAuthentication();
$partner_id = $this->getRequestParameter('partner_id', -1);
if ($partner_id >= 0) {
myPartnerUtils::applyPartnerFilters($partner_id);
}
$this->partner_id = $partner_id;
$order = $this->getRequestParameter('sort', kshow::KSHOW_SORT_MOST_VIEWED);
$page = $this->getRequestParameter('page', 1);
//$this->producer_id = $this->getRequestParameter('producer_id', 0 );
//$this->kaltura_part_of_flag = $this->getRequestParameter('partof', 0 );
$pager = kshowPeer::getOrderedPager($order, 10, $page);
$kshow_list = $pager->getResults();
dashboardUtils::updateKshowsRoughcutCount($kshow_list);
$kshowsData = array();
foreach ($kshow_list as $kshow) {
$kshowsData[] = $this->createKShowData($kshow, $order);
}
// following variables will be used by the view
$this->firstTime = $this->getRequestParameter('first', 1) == 1;
$this->order = $order;
$this->page = $page;
$this->lastPage = $pager->getLastPage();
$this->numResults = $pager->getNbResults();
$this->kshowsData = $kshowsData;
// allow the action buttons to show only for shows the user produced, and only for authenticated users, on their own pages
$this->allowactions = true;
// !$this->kaltura_part_of_flag && $this->getUser()->isAuthenticated() && $this->getUser()->getAttribute('id') == $this->producer_id;
}