Public Member Functions | |
__construct ($aColumns) | |
setName ($sName) | |
processRequest ($sFunction=null) | |
Protected Member Functions | |
_getActionIds ($sId) | |
_getQuery () | |
_getSortCol () | |
_getColNames ($sId=null) | |
_getIdentColNames () | |
_getVisibleColNames () | |
_getQueryCols () | |
_getSorting () | |
_getLimit ($iStart) | |
_getFilter () | |
_addFilter ($sQ) | |
_getAll ($sQ) | |
_getSortDir () | |
_getStartIndex () | |
_getTotalCount ($sQ) | |
_getDataFields ($sQ) | |
_outputResponse ($aData) | |
_getData ($sCountQ, $sQ) | |
Protected Attributes | |
$_aPosDir = array( 'asc', 'desc' ) | |
$_aColumns = array() | |
$_iSqlLimit = 2500 |
ajaxlistcomponent.__construct | ( | $ | aColumns | ) |
Constructor class, initializes AJAX columns
array | $aColumns Array of DB table columns which are loaded from DB |
ajaxlistcomponent._getActionIds | ( | $ | sId | ) | [protected] |
Required data fields are returned by indexes/position in _aColumns array. This method translates "table_name.col_name" into index definition and fetches request data according to it. This is usefull while using AJAX across versions.
string | $sId "table_name.col_name" |
ajaxlistcomponent.setName | ( | $ | sName | ) |
AJAX container name setter
string | $sName name of container |
ajaxlistcomponent._getQuery | ( | ) | [protected] |
Empty function, developer should override this method according requirements
Reimplemented in ajaxcomponent, ajaxcomponent, ajaxcomponent, ajaxcomponent, ajaxcomponent, ajaxcomponent, ajaxcomponent, ajaxcomponent, ajaxcomponent, ajaxcomponent, ajaxcomponent, ajaxcomponent, ajaxcomponent, ajaxcomponent, ajaxcomponent, ajaxcomponent, ajaxcomponent, ajaxcomponent, ajaxcomponent, ajaxcomponent, ajaxcomponent, ajaxcomponent, ajaxcomponent, ajaxcomponent, ajaxcomponent, ajaxcomponent, ajaxcomponent, ajaxcomponent, ajaxcomponent, ajaxcomponent, ajaxcomponent, ajaxcomponent, ajaxcomponent, ajaxcomponent, ajaxcomponent, ajaxcomponent, ajaxcomponent, ajaxcomponent, ajaxcomponent, ajaxcomponent, ajaxcomponent, ajaxcomponent, ajaxcomponent, and ajaxcomponent.
ajaxlistcomponent.processRequest | ( | $ | sFunction = null |
) |
AJAX call processor function
string | $sFunction name of action to execute (optional) |
ajaxlistcomponent._getSortCol | ( | ) | [protected] |
Returns column id to sort
ajaxlistcomponent._getColNames | ( | $ | sId = null |
) | [protected] |
Returns array of cotainer DB cols which must be loaded. If id is not passed - all possible containers cols will be returned
string | $sId container id (optional) |
ajaxlistcomponent._getIdentColNames | ( | ) | [protected] |
Returns array of identifiers which are used as identifiers for specific actions in AJAX and further in this processor class
ajaxlistcomponent._getVisibleColNames | ( | ) | [protected] |
Returns array of col names which are requested by AJAX call and will be fetched from DB
ajaxlistcomponent._getQueryCols | ( | ) | [protected] |
Formats and returns chunk of SQL query string with definition of fields to load from DB
Reimplemented in ajaxcomponent, ajaxcomponent, ajaxcomponent, ajaxcomponent, ajaxcomponent, ajaxcomponent, ajaxcomponent, ajaxcomponent, and ajaxcomponent.
ajaxlistcomponent._getSorting | ( | ) | [protected] |
Formats and returns part of SQL query for sorting
Reimplemented in ajaxcomponent, ajaxcomponent, ajaxcomponent, ajaxcomponent, and ajaxcomponent.
ajaxlistcomponent._getLimit | ( | $ | iStart | ) | [protected] |
Returns part of SQL query for limiting number of entries from DB
int | $iStart start position |
ajaxlistcomponent._getFilter | ( | ) | [protected] |
Returns part of SQL query for filtering DB data
ajaxlistcomponent._addFilter | ( | $ | sQ | ) | [protected] |
Adds filter SQL to current query
string | $sQ query to add filter condition |
ajaxlistcomponent._getAll | ( | $ | sQ | ) | [protected] |
Returns DB records as plain indexed array
string | $sQ SQL query |
ajaxlistcomponent._getSortDir | ( | ) | [protected] |
ajaxlistcomponent._getStartIndex | ( | ) | [protected] |
Returns position from where data must be loaded
ajaxlistcomponent._getTotalCount | ( | $ | sQ | ) | [protected] |
Returns amount of records which can be found according to passed SQL query
string | $sQ SQL query |
ajaxlistcomponent._getDataFields | ( | $ | sQ | ) | [protected] |
Returns array with DB records
string | $sQ SQL query |
ajaxlistcomponent._outputResponse | ( | $ | aData | ) | [protected] |
Outputs JSON encoded data
array | $aData data to output |
ajaxlistcomponent._getData | ( | $ | sCountQ, | |
$ | sQ | |||
) | [protected] |
Formats data array which later will be processed by _outputResponse method
string | $sCountQ count query | |
string | $sQ data load query |
Reimplemented in ajaxcomponent.
ajaxlistcomponent.$_aPosDir = array( 'asc', 'desc' ) [protected] |
ajaxlistcomponent.$_aColumns = array() [protected] |
ajaxlistcomponent.$_iSqlLimit = 2500 [protected] |