\wf_JqDtHelper
JQuery Data Tables JSON formatting class
Synopsis
class wf_JqDtHelper
{
- // members
- protected array $allRows = ;
- protected integer $rowsTotalCount = 0;
- protected integer $rowsFilteredCount = 0;
- protected integer $draw = 0;
- protected bool $sSideFlag = true;
- // methods
- public void __construct()
- public void setServerSideProcessing()
- public void addRow()
- protected string renderJson()
- public void setTotalRowsCount()
- public void setFilteredRowsCount()
- public void getJson()
- public string extractJson()
- public void flushData()
Members
protected
- $allRows
—
array
Contains raw array of added grid elements - $draw
—
int
The draw counter that this object is a response to - $rowsFilteredCount
—
int
Filtered rows count - $rowsTotalCount
—
int
Total available records count - $sSideFlag
—
bool
Server side processing flag
Methods
protected
- renderJson() — Returns JSON acceptible for jquery data tables
public
- __construct()
- addRow() — Adds new row to elements array, dont forget unset() data in your loop, after adding new row.
- extractJson() — Extracts rendered JSON data from object
- flushData() — Flushes current object instance elements array
- getJson() — Renders empty page JSON data for background ajax requests
- setFilteredRowsCount() — Sets filtered rows count
- setServerSideProcessing() — Sets the server-side processing state.
- setTotalRowsCount() — Sets total rows count