\seekquarry\yioop\views\helpersPagingtableHelper

Used to create links to go backward/forwards and search a database tables. HTML table with data representing a database table might have millions of rows so want to limit what the user actually gets at one time and just allow the user to "page" through in increments of 10, 20, 50, 100, 200 rows at a time.

Helpers are classes used to reduce the coding required in Views. They do some computation with the data they are supplied and output HTML/XML

Summary

Methods
Properties
Constants
__construct()
render()
mobileTableControls()
desktopTableControls()
drawTableTitle()
$show_choices
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$show_choices

$show_choices : array

The choices for how many rows out of the database table to display

Type

array

Methods

__construct()

__construct() 

The constructor at this point does nothing

render()

render(array  $data) 

Used to render the links to go backwards and forwards through a databse table. We have two separate functions for the mobile and desktop drawers.

Parameters

array $data

fields of this contain values from teh controller for the CSRF_TOKEN; NUM_TOTAL of rows; NUM_SHOW, the number to show; etc.

mobileTableControls()

mobileTableControls(array  $data) 

Draws the heading before a paging table as well as the controls for what rows to see (mobile phone case).

Parameters

array $data

needed for dropdown values for number of groups to display

desktopTableControls()

desktopTableControls(array  $data) 

Draws the heading before the user table as well as the controls for what user to see (desktop, laptop, tablet case).

Parameters

array $data

needed for dropdown values for number of groups to display

drawTableTitle()

drawTableTitle(array  $data) 

Draw title of heading on table as well as the add row form toggle

Parameters

array $data

from controller/component to figure out localized table name ($data['TABLE_TITLE']) as well as the toggle state of the add row form $data['DISABLE_ADD_TOGGLE']