Public Member Functions | Protected Member Functions | Protected Attributes

ajaxListComponent Class Reference

Inheritance diagram for ajaxListComponent:
Collaboration diagram for ajaxListComponent:

List of all members.

Public Member Functions

 init ($aColumns)
 setName ($sName)
 processRequest ($sFunction=null)
 resetArtSeoUrl ($aArtIds, $aCatIds=null)
 resetContentCache ()
 resetCounter ($sCounterType, $sValue=null)

Protected Member Functions

 _getActionIds ($sId)
 _getQuery ()
 _getDataQuery ($sQ)
 _getCountQuery ($sQ)
 _getSortCol ()
 _getColNames ($sId=null)
 _getIdentColNames ()
 _getVisibleColNames ()
 _getQueryCols ()
 _buildColsQuery ($aIdentCols, $blIdentCols=true)
 _isExtendedColumn ($sColumn)
 _getExtendedColQuery ($sViewTable, $sColumn, $iCnt)
 _getSorting ()
 _getLimit ($iStart)
 _getFilter ()
 _addFilter ($sQ)
 _getAll ($sQ)
 _getSortDir ()
 _getStartIndex ()
 _getTotalCount ($sQ)
 _getDataFields ($sQ)
 _outputResponse ($aData)
 _output ($sOut)
 _getViewName ($sTable)
 _getData ($sCountQ, $sQ)

Protected Attributes

 $_aPosDir = array( 'asc', 'desc' )
 $_aColumns = array()
 $_iSqlLimit = 2500
 $_sContainer = null
 $_blAllowExtColumns = false

Detailed Description

AJAX call processor class

Definition at line 34 of file oxajax.php.


Member Function Documentation

ajaxListComponent._addFilter ( sQ  )  [protected]

Adds filter SQL to current query

Parameters:
string $sQ query to add filter condition
Returns:
string

Reimplemented in ajaxComponent, ajaxComponent, ajaxComponent, ajaxComponent, ajaxComponent, ajaxComponent, ajaxComponent, and ajaxComponent.

Definition at line 415 of file oxajax.php.

ajaxListComponent._buildColsQuery ( aIdentCols,
blIdentCols = true 
) [protected]

Builds column selection query

Parameters:
array $aIdentCols columns
bool $blIdentCols if true, means ident columns part is build
Returns:
string

Definition at line 279 of file oxajax.php.

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.

Parameters:
string $sId "table_name.col_name"
Returns:
array

Definition at line 93 of file oxajax.php.

ajaxListComponent._getAll ( sQ  )  [protected]

Returns DB records as plain indexed array

Parameters:
string $sQ SQL query
Returns:
array

Definition at line 430 of file oxajax.php.

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

Parameters:
string $sId container id (optional)
Returns:
array

Definition at line 195 of file oxajax.php.

ajaxListComponent._getCountQuery ( sQ  )  [protected]

Return fully formatted query for data records count

Parameters:
string $sQ part of initial query
Returns:
string

Definition at line 144 of file oxajax.php.

ajaxListComponent._getData ( sCountQ,
sQ 
) [protected]

Formats data array which later will be processed by _outputResponse method

Parameters:
string $sCountQ count query
string $sQ data load query
Returns:
array

Reimplemented in ajaxComponent.

Definition at line 556 of file oxajax.php.

ajaxListComponent._getDataFields ( sQ  )  [protected]

Returns array with DB records

Parameters:
string $sQ SQL query
Returns:
array

Reimplemented in ajaxComponent.

Definition at line 493 of file oxajax.php.

ajaxListComponent._getDataQuery ( sQ  )  [protected]

Return fully formatted query for data loading

Parameters:
string $sQ part of initial query
Returns:
string

Definition at line 132 of file oxajax.php.

ajaxListComponent._getExtendedColQuery ( sViewTable,
sColumn,
iCnt 
) [protected]

Returns extended query part for given view/column combination (if variants must be shown in lists and column name is "oxtitle")

Parameters:
string $sViewTable view name
string $sColumn column name
int $iCnt column count
Returns:
string

Definition at line 326 of file oxajax.php.

ajaxListComponent._getFilter (  )  [protected]

Returns part of SQL query for filtering DB data

Returns:
string

Definition at line 363 of file oxajax.php.

ajaxListComponent._getIdentColNames (  )  [protected]

Returns array of identifiers which are used as identifiers for specific actions in AJAX and further in this processor class

Returns:
array

Definition at line 214 of file oxajax.php.

ajaxListComponent._getLimit ( iStart  )  [protected]

Returns part of SQL query for limiting number of entries from DB

Parameters:
int $iStart start position
Returns:
string

Definition at line 350 of file oxajax.php.

ajaxListComponent._getQuery (  )  [protected]
ajaxListComponent._getQueryCols (  )  [protected]

Formats and returns chunk of SQL query string with definition of fields to load from DB

Returns:
string

Reimplemented in ajaxComponent.

Definition at line 263 of file oxajax.php.

ajaxListComponent._getSortCol (  )  [protected]

Returns column id to sort

Returns:
int

Definition at line 176 of file oxajax.php.

ajaxListComponent._getSortDir (  )  [protected]

Checks user input and returns SQL sorting direction key

Returns:
string

Definition at line 448 of file oxajax.php.

ajaxListComponent._getSorting (  )  [protected]

Formats and returns part of SQL query for sorting

Returns:
string

Reimplemented in ajaxComponent, ajaxComponent, ajaxComponent, ajaxComponent, and ajaxComponent.

Definition at line 338 of file oxajax.php.

ajaxListComponent._getStartIndex (  )  [protected]

Returns position from where data must be loaded

Returns:
int

Definition at line 463 of file oxajax.php.

ajaxListComponent._getTotalCount ( sQ  )  [protected]

Returns amount of records which can be found according to passed SQL query

Parameters:
string $sQ SQL query
Returns:
int

Definition at line 475 of file oxajax.php.

ajaxListComponent._getViewName ( sTable  )  [protected]

Return the view name of the given table if a view exists, otherwise the table name itself

Parameters:
string $sTable table name
Returns:
string

Definition at line 543 of file oxajax.php.

ajaxListComponent._getVisibleColNames (  )  [protected]

Returns array of col names which are requested by AJAX call and will be fetched from DB

Returns:
array

Definition at line 230 of file oxajax.php.

ajaxListComponent._isExtendedColumn ( sColumn  )  [protected]

Checks if current column is extended (currently checks if variants must be shown in lists and column name is "oxtitle")

Parameters:
string $sColumn column name
Returns:
bool

Definition at line 306 of file oxajax.php.

ajaxListComponent._output ( sOut  )  [protected]

Echoes given string

Parameters:
string $sOut string to echo
Returns:
null

Definition at line 531 of file oxajax.php.

ajaxListComponent._outputResponse ( aData  )  [protected]

Outputs JSON encoded data

Parameters:
array $aData data to output
Returns:
null

Definition at line 505 of file oxajax.php.

ajaxListComponent.init ( aColumns  ) 

Initializes AJAX columns

Parameters:
array $aColumns Array of DB table columns which are loaded from DB
Returns:
null

Definition at line 79 of file oxajax.php.

ajaxListComponent.processRequest ( sFunction = null  ) 

AJAX call processor function

Parameters:
string $sFunction name of action to execute (optional)
Returns:
null

Definition at line 156 of file oxajax.php.

ajaxListComponent.resetArtSeoUrl ( aArtIds,
aCatIds = null 
)

Marks article seo url as expired

Parameters:
array $aArtIds article id's
array $aCatIds ids if categories, which must be removed from oxseo
Returns:
null

Definition at line 597 of file oxajax.php.

ajaxListComponent.resetContentCache (  ) 

Reset output cache

Returns:
null

Definition at line 633 of file oxajax.php.

ajaxListComponent.resetCounter ( sCounterType,
sValue = null 
)

Resets counters values from cache. Resets price category articles, category articles, vendor articles, manufacturer articles count.

Parameters:
string $sCounterType counter type
string $sValue reset value
Returns:
null

Definition at line 654 of file oxajax.php.

ajaxListComponent.setName ( sName  ) 

AJAX container name setter

Parameters:
string $sName name of container
Returns:
null

Definition at line 110 of file oxajax.php.


Member Data Documentation

ajaxListComponent.$_aColumns = array() [protected]

Definition at line 48 of file oxajax.php.

ajaxListComponent.$_aPosDir = array( 'asc', 'desc' ) [protected]

Definition at line 41 of file oxajax.php.

ajaxListComponent.$_blAllowExtColumns = false [protected]

Reimplemented in ajaxComponent.

Definition at line 70 of file oxajax.php.

ajaxListComponent.$_iSqlLimit = 2500 [protected]

Definition at line 55 of file oxajax.php.

ajaxListComponent.$_sContainer = null [protected]

Definition at line 62 of file oxajax.php.


The documentation for this class was generated from the following file: