当前位置: 首页>>代码示例>>PHP>>正文


PHP Pagination::get方法代码示例

本文整理汇总了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]);
 }
开发者ID:eok8177,项目名称:shopCMS,代码行数:12,代码来源:Novaposhta.php

示例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]);
 }
开发者ID:eok8177,项目名称:shopCMS,代码行数:9,代码来源:Customers.php

示例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]);
 }
开发者ID:eok8177,项目名称:shopCMS,代码行数:10,代码来源:Orders.php

示例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);
 }
开发者ID:eok8177,项目名称:shopCMS,代码行数:14,代码来源:Page.php

示例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);
 }
开发者ID:eok8177,项目名称:shopCMS,代码行数:18,代码来源:Category.php

示例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;
 }
开发者ID:cresta522,项目名称:imp,代码行数:15,代码来源:imp.php


注:本文中的Pagination::get方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。