Paginated_Grid __construct(
string
$name, integer
$columns_number, [integer
$page_size = 20], [integer
$forgiving = true]
)
|
|
Constructor
Parameters:
|
string |
$name: |
Name of grid |
|
integer |
$columns_number: |
How many coluns will grid have |
|
integer |
$page_size: |
Size of the page (how many rows) |
|
integer |
$forgiving: |
Will forgive when not existing page is addressed |
Redefinition of:
- Grid::__construct()
- Constructor
void calculate_end(
integer
$start
)
|
|
Calculates row end index of the page
Parameters:
API Tags:
| Internal: | |
| Access: | protected |
integer calculate_start(
)
|
|
Calculates row start index of the page
API Tags:
| Internal: | |
| Access: | protected |
integer calculate_total_pages(
)
|
|
Calculate total pages
API Tags:
unknown fetch_current_page(
unknown_type
$params
)
|
|
Fetches current page.
Parameters:
API Tags:
array fetch_first_page(
)
|
|
Fetches first page
API Tags:
Fetches last page
API Tags:
Fetches next page (next is relative to current page)
API Tags:
array fetch_page(
integer
$page
)
|
|
Fetches page specified by $page
Parameters:
API Tags:
Fetches previous page
API Tags:
unknown get_current_page(
)
|
|
Returns current page
API Tags:
Returns page size
API Tags:
unknown get_total_pages(
)
|
|
Retursn count of pages
API Tags:
unknown get_total_rows(
)
|
|
Return count of rows
API Tags:
boolean is_valid_page(
integer
$page
)
|
|
Checks if page numbers is in existing range of pages
Parameters:
API Tags:
| Internal: | |
| Access: | private |
Recalculates total rows and total pages
API Tags:
void set_current_page(
integer
$current_page
)
|
|
Sets current page
Parameters:
API Tags:
| Internal: | |
| Access: | protected |
void set_page_size(
integer
$page_size
)
|
|
Sets page size
Parameters:
API Tags:
| Internal: | |
| Access: | protected |
void set_total_pages(
unknown_type
$total_pages
)
|
|
Sets count of pages
Parameters:
|
unknown_type |
$total_pages: |
|
API Tags:
void set_total_rows(
unknown_type
$total_rows
)
|
|
Sets count of rows
Parameters:
|
unknown_type |
$total_rows: |
|
API Tags:
array _fetch_current_page(
)
|
|
Fetches current page.
The page can be smaller than $this->rows.
API Tags:
| Internal: | |
| Access: | protected |