PHP Class TbPager

See also: http://twitter.github.com/bootstrap/components.html#pagination
Inheritance: extends CLinkPager
Show file Open project: yinhe/yincart Class Usage Examples

Public Properties

Property Type Description
$alignment the pager alignment. Valid values are 'centered' and 'right'.
$cssFile the URL of the CSS file used by this pager. Defaults to false, meaning that no CSS will be included.
$displayFirstAndLast whether to display the first and last items.
$header the text shown before page buttons. Defaults to an empty string, meaning that no header will be displayed.

Public Methods

Method Description
init ( ) ### .init()

Protected Methods

Method Description
createPageButton ( string $label, integer $page, string $class, boolean $hidden, boolean $selected ) : string ### .createPageButton()
createPageButtons ( ) : array ### .createPageButtons()

Method Details

createPageButton() protected method

Creates a page button. You may override this method to customize the page buttons.
protected createPageButton ( string $label, integer $page, string $class, boolean $hidden, boolean $selected ) : string
$label string the text label for the button
$page integer the page number
$class string the CSS class for the page button. This could be 'page', 'first', 'last', 'next' or 'previous'.
$hidden boolean whether this page button is visible
$selected boolean whether this page button is selected
return string the generated button

createPageButtons() protected method

Creates the page buttons.
protected createPageButtons ( ) : array
return array a list of page buttons (in HTML code).

init() public method

Initializes the pager by setting some default property values.
public init ( )

Property Details

$alignment public property

the pager alignment. Valid values are 'centered' and 'right'.
public $alignment

$cssFile public property

the URL of the CSS file used by this pager. Defaults to false, meaning that no CSS will be included.
public $cssFile

$displayFirstAndLast public property

whether to display the first and last items.
public $displayFirstAndLast

$header public property

the text shown before page buttons. Defaults to an empty string, meaning that no header will be displayed.
public $header