當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。