本文整理汇总了PHP中Pagination::get方法的典型用法代码示例。如果您正苦于以下问题:PHP Pagination::get方法的具体用法?PHP Pagination::get怎么用?PHP Pagination::get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Pagination
的用法示例。
在下文中一共展示了Pagination::get方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: action_list
/**
* List cities
*/
public function action_list()
{
$obj = ORM::factory('Novaposhta_City');
$pg = Pagination::get($obj->count_all(false), 14);
$obj = $obj->find_per_page($pg->offset, $pg->items_per_page);
// Data for template
$this->title = __('Новая Почта - Населенные пункты');
$this->content = View::factory('shop/backend/novaposhta/v_list', ['pg' => $pg, 'obj' => $obj, 'total_items' => $pg->total_items]);
}
示例2: action_list
public function action_list()
{
$obj = ORM::factory('Shop_Customer');
$pg = Pagination::get($obj->count_all(false), Config::get('shop.per_page_backend'));
$obj = $obj->find_per_page($pg->offset, $pg->items_per_page, true);
// Data for template
$this->title = __('Клиенты');
$this->content = View::factory('shop/backend/customers/v_list', ['pg' => $pg, 'obj' => $obj]);
}
示例3: action_list
public function action_list()
{
$this->save_referer('shop_order');
$obj = ORM::factory('Shop_Order');
$pg = Pagination::get($obj->count_all(false), Config::get('shop.per_page_backend'));
$obj = $obj->find_per_page($pg->offset, $pg->items_per_page, true);
// Data for template
$this->title = __('Заказы');
$this->content = View::factory('shop/backend/orders/v_list', ['pg' => $pg, 'obj' => $obj, 'total_items' => $pg->total_items]);
}
示例4: _list
/**
* List
*/
private function _list($obj)
{
$this->title = __('publications.page_manager');
$this->save_referer(Request::get('controller'));
$pag = Pagination::get($obj->count_all(false), $this->settings_mod['per_page_backend']);
$total_items = $pag->total_items;
$obj = $obj->offset($pag->offset)->limit($pag->items_per_page)->get_order_by('date', 'DESC')->order_by('id', 'DESC')->find_all();
$category_id = $this->request->param('id', 0);
$sel_category = Tree::instance('publications_categories', $this->curr_module)->form_select('id', $category_id, [0, ''], ['class' => 'form-control']);
$this->content = View::factory($this->view, ['obj' => $obj, 'sel_category' => $sel_category, 'total_items' => $total_items])->bind('pag', $pag);
}
示例5: action_list
/**
* List
*/
public function action_list()
{
$this->title = __('shop.category_manager');
$this->save_referer(Request::get('controller'));
if ($this->settings_mod['max_nested'] > 1) {
$obj = Tree::instance('shop_categories', $this->curr_module)->for_table();
$total_items = count($obj);
} else {
$obj = ORM::factory('Shop_Category');
$pag = Pagination::get($obj->count_all(false), $this->settings_mod['per_page_backend']);
$total_items = $pag->total_items;
$obj = $obj->offset($pag->offset)->limit($pag->items_per_page)->get_order_by('position', 'ASC')->find_all();
}
$this->content = View::factory($this->view, ['obj' => $obj, 'total_items' => $total_items])->bind('pag', $pag);
}
示例6: GetRes
public static function GetRes($input)
{
//\De::str($input);
$query = \DB::select();
$query->from('res_data');
$query->where('post_id', $input['post_id']);
$query->where('bbs_type_id', $input['bbs_type_id']);
$query->where('display_flag', 1);
$query->limit(\Pagination::get('per_page'));
$query->offset(\Pagination::get('offset'));
$data = $query->execute()->as_array();
//\De::str($data);
$result = @$data;
return $result;
}