Skip to content

CI_Pagination

Mathieu Nayrolles edited this page Jan 20, 2016 · 1 revision

CI_Pagination

Pagination Class

  • Class name: CI_Pagination
  • Namespace:

Properties

$base_url

protected string $base_url = ''

Base URL

The page that we're linking to

  • Visibility: protected

$prefix

protected string $prefix = ''

Prefix

  • Visibility: protected

$suffix

protected string $suffix = ''

Suffix

  • Visibility: protected

$total_rows

protected integer $total_rows

Total number of items

  • Visibility: protected

$num_links

protected integer $num_links = 2

Number of links to show

Relates to "digit" type links shown before/after the currently viewed page.

  • Visibility: protected

$per_page

public integer $per_page = 10

Items per page

  • Visibility: public

$cur_page

public integer $cur_page

Current page

  • Visibility: public

$use_page_numbers

protected boolean $use_page_numbers = FALSE

Use page numbers flag

Whether to use actual page numbers instead of an offset

  • Visibility: protected

$first_link

protected string $first_link = '‹ First'

First link

  • Visibility: protected

$next_link

protected string $next_link = '>'

Next link

  • Visibility: protected

$prev_link

protected string $prev_link = '<'

Previous link

  • Visibility: protected

$last_link

protected string $last_link = 'Last ›'

Last link

  • Visibility: protected

$uri_segment

protected integer $uri_segment

URI Segment

  • Visibility: protected

$full_tag_open

protected string $full_tag_open = ''

Full tag open

  • Visibility: protected

$full_tag_close

protected string $full_tag_close = ''

Full tag close

  • Visibility: protected

$first_tag_open

protected string $first_tag_open = ''

First tag open

  • Visibility: protected

$first_tag_close

protected string $first_tag_close = ''

First tag close

  • Visibility: protected

$last_tag_open

protected string $last_tag_open = ''

Last tag open

  • Visibility: protected

$last_tag_close

protected string $last_tag_close = ''

Last tag close

  • Visibility: protected

$first_url

protected string $first_url = ''

First URL

An alternative URL for the first page

  • Visibility: protected

$cur_tag_open

protected string $cur_tag_open = '<strong>'

Current tag open

  • Visibility: protected

$cur_tag_close

protected string $cur_tag_close = '</strong>'

Current tag close

  • Visibility: protected

$next_tag_open

protected string $next_tag_open = ''

Next tag open

  • Visibility: protected

$next_tag_close

protected string $next_tag_close = ''

Next tag close

  • Visibility: protected

$prev_tag_open

protected string $prev_tag_open = ''

Previous tag open

  • Visibility: protected

$prev_tag_close

protected string $prev_tag_close = ''

Previous tag close

  • Visibility: protected

$num_tag_open

protected string $num_tag_open = ''

Number tag open

  • Visibility: protected

$num_tag_close

protected string $num_tag_close = ''

Number tag close

  • Visibility: protected

$page_query_string

protected boolean $page_query_string = FALSE

Page query string flag

  • Visibility: protected

$query_string_segment

protected string $query_string_segment = 'per_page'

Query string segment

  • Visibility: protected

$display_pages

protected boolean $display_pages = TRUE

Display pages flag

  • Visibility: protected

$_attributes

protected string $_attributes = ''

Attributes

  • Visibility: protected

$_link_types

protected array $_link_types = array()

Link types

"rel" attribute

  • Visibility: protected

$reuse_query_string

protected boolean $reuse_query_string = FALSE

Reuse query string flag

  • Visibility: protected

$use_global_url_suffix

protected boolean $use_global_url_suffix = FALSE

Use global URL suffix flag

  • Visibility: protected

$data_page_attr

protected string $data_page_attr = 'data-ci-pagination-page'

Data page attribute

  • Visibility: protected

$CI

protected object $CI

CI Singleton

  • Visibility: protected

Methods

__construct

void CI_Pagination::__construct(array $params)

Constructor

  • Visibility: public

Arguments

  • $params array - <p>Initialization parameters</p>

initialize

\CI_Pagination CI_Pagination::initialize(array $params)

Initialize Preferences

  • Visibility: public

Arguments

  • $params array - <p>Initialization parameters</p>

create_links

string CI_Pagination::create_links()

Generate the pagination links

  • Visibility: public

_parse_attributes

void CI_Pagination::_parse_attributes(array $attributes)

Parse attributes

  • Visibility: protected

Arguments

  • $attributes array

_attr_rel

string CI_Pagination::_attr_rel(string $type)

Add "rel" attribute

  • Visibility: protected

Arguments

  • $type string
Clone this wiki locally