Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php defined('BASEPATH') OR exit('No direct script access allowed');
- class Mygination
- {
- protected $ci;
- public function __construct()
- {
- $this->ci=& get_instance();
- $this->ci->load->library('pagination');
- }
- /**
- * Prepare to render Pagination with Bootstrap
- * @return [type] [description]
- */
- public function render(){
- return $this->bootstrap();
- }
- /**
- * Setup configs to load pagination with Bootstrap
- * @return [type] [description]
- */
- private function bootstrap(){
- // Config for bootstrap pagination class integration
- $config['full_tag_open'] = '<ul class="pagination">';
- $config['full_tag_close'] = '</ul>';
- $config['first_link'] = false;
- $config['last_link'] = false;
- $config['first_tag_open'] = '<li>';
- $config['first_tag_close'] = '</li>';
- $config['prev_link'] = '«';
- $config['prev_tag_open'] = '<li class="prev">';
- $config['prev_tag_close'] = '</li>';
- $config['next_link'] = '»';
- $config['next_tag_open'] = '<li>';
- $config['next_tag_close'] = '</li>';
- $config['last_tag_open'] = '<li>';
- $config['last_tag_close'] = '</li>';
- $config['cur_tag_open'] = '<li class="active"><a href="#">';
- $config['cur_tag_close'] = '</a></li>';
- $config['num_tag_open'] = '<li>';
- $config['num_tag_close'] = '</li>';
- return $config;
- }
- }
- /* End of file Mygination.php */
- /* Location: ./application/libraries/Mygination.php */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement