本文整理汇总了PHP中MY_Controller::set_pager_style方法的典型用法代码示例。如果您正苦于以下问题:PHP MY_Controller::set_pager_style方法的具体用法?PHP MY_Controller::set_pager_style怎么用?PHP MY_Controller::set_pager_style使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MY_Controller
的用法示例。
在下文中一共展示了MY_Controller::set_pager_style方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: index
function index($offset = 0)
{
//Content
$uri_segment = 3;
$offset = $this->uri->segment($uri_segment);
$query_id = $this->session->userdata('query_id');
$this->input->load_query($query_id);
$code_s = $this->input->get('code_s');
$name_s = $this->input->get('name_s');
$this->data['query'] = $this->questions_model->search($code_s, $name_s, $this->limit, $offset);
$page_config['base_url'] = site_url('questions/index/');
$page_config['total_rows'] = $this->questions_model->count_results($name_s);
$page_config['per_page'] = $this->limit;
$page_config['uri_segment'] = $uri_segment;
$page_config = parent::set_pager_style($page_config);
$this->pagination->initialize($page_config);
$this->data['pagination'] = $this->pagination->create_links();
$this->data['total_rows'] = $page_config['total_rows'];
$this->data['content'] = 'questions_list';
$this->load->view('templates/default', $this->data);
}