\TbJsonPager

## Class TbJsonPager

Use this specific pager for JSON grid, not the standard one!

Summary

Methods
Properties
Constants
init()
run()
$containerTag
$containerHtmlOptions
$alignment
$header
$cssFile
$displayFirstAndLast
$json
ALIGNMENT_CENTER
ALIGNMENT_RIGHT
createPageButtons()
createPageButton()
No protected properties found
N/A
No private methods found
No private properties found
N/A

Constants

ALIGNMENT_CENTER

ALIGNMENT_CENTER

ALIGNMENT_RIGHT

ALIGNMENT_RIGHT

Properties

$containerTag

$containerTag : string

Type

string — attributes for the pager container tag.

$containerHtmlOptions

$containerHtmlOptions : array

Type

array — HTML attributes for the pager container tag.

$alignment

$alignment : string

Type

string — the pager alignment. Valid values are 'centered' and 'right'.

$header

$header : string

Type

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

$cssFile

$cssFile : string

Type

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

$displayFirstAndLast

$displayFirstAndLast : boolean

Type

boolean — whether to display the first and last items.

$json

$json : string

Type

string — json.

Methods

init()

init()

### .init()

Initializes the pager by setting some default property values.

run()

run()

### .run()

Runs the widget.

createPageButtons()

createPageButtons() : array

### .createPageButtons()

Creates the page buttons.

Returns

array —

a list of page buttons (in HTML code).

createPageButton()

createPageButton(string $label, integer $page, string $class, boolean $hidden, boolean $selected) : string

### .createPageButton()

Creates a page button. You may override this method to customize the page buttons.

Parameters

string $label

the text label for the button

integer $page

the page number

string $class

the CSS class for the page button. This could be 'page', 'first', 'last', 'next' or 'previous'.

boolean $hidden

whether this page button is visible

boolean $selected

whether this page button is selected

Returns

string —

the generated button