OXID eShop CE  4.8.10
 All Classes Files Functions Variables Pages
ajaxListComponent Class Reference
+ Inheritance diagram for ajaxListComponent:
+ Collaboration diagram for ajaxListComponent:

Public Member Functions

 init ($aColumns=null)
 getColumns ()
 setColumns ($aColumns)
 setName ($sName)
 processRequest ($sFunction=null)
 resetArtSeoUrl ($aArtIds, $aCatIds=null)
 resetContentCache ()
 resetCounter ($sCounterType, $sValue=null)
- Public Member Functions inherited from oxSuperCfg
 __call ($sMethod, $aArgs)
 __construct ()
 getConfig ()
 setConfig ($oConfig)
 getSession ()
 setSession ($oSession)
 getUser ()
 setUser ($oUser)
 isAdmin ()
 setAdminMode ($blAdmin)

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

Additional Inherited Members

- Static Protected Attributes inherited from oxSuperCfg
static $_oConfig = null
static $_oSession = null
static $_oRights = null
static $_oActUser = null
static $_blIsAdmin = null

Detailed Description

AJAX call processor class

Definition at line 7 of file ajaxlistcomponent.php.

Member Function Documentation

ajaxListComponent::_addFilter (   $sQ)
protected

Adds filter SQL to current query

Parameters
string$sQquery to add filter condition
Returns
string

Reimplemented in category_main_ajax, actions_main_ajax, attribute_main_ajax, manufacturer_main_ajax, vendor_main_ajax, actions_article_ajax, and article_bundle_ajax.

Definition at line 416 of file ajaxlistcomponent.php.

ajaxListComponent::_buildColsQuery (   $aIdentCols,
  $blIdentCols = true 
)
protected

Builds column selection query

Parameters
array$aIdentColscolumns
bool$blIdentColsif true, means ident columns part is build
Returns
string

Definition at line 280 of file ajaxlistcomponent.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 92 of file ajaxlistcomponent.php.

ajaxListComponent::_getAll (   $sQ)
protected

Returns DB records as plain indexed array

Parameters
string$sQSQL query
Returns
array

Definition at line 431 of file ajaxlistcomponent.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$sIdcontainer id (optional)
Returns
array

Definition at line 196 of file ajaxlistcomponent.php.

ajaxListComponent::_getCountQuery (   $sQ)
protected

Return fully formatted query for data records count

Parameters
string$sQpart of initial query
Returns
string

Definition at line 143 of file ajaxlistcomponent.php.

ajaxListComponent::_getData (   $sCountQ,
  $sQ 
)
protected

Formats data array which later will be processed by _outputResponse method

Parameters
string$sCountQcount query
string$sQdata load query
Returns
array

Reimplemented in statistic_main_ajax.

Definition at line 557 of file ajaxlistcomponent.php.

ajaxListComponent::_getDataFields (   $sQ)
protected

Returns array with DB records

Parameters
string$sQSQL query
Returns
array

Reimplemented in article_extend_ajax.

Definition at line 494 of file ajaxlistcomponent.php.

ajaxListComponent::_getDataQuery (   $sQ)
protected

Return fully formatted query for data loading

Parameters
string$sQpart of initial query
Returns
string

Definition at line 131 of file ajaxlistcomponent.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$sViewTableview name
string$sColumncolumn name
int$iCntcolumn count
Returns
string

Definition at line 327 of file ajaxlistcomponent.php.

ajaxListComponent::_getFilter ( )
protected

Returns part of SQL query for filtering DB data

Returns
string

Definition at line 364 of file ajaxlistcomponent.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 215 of file ajaxlistcomponent.php.

ajaxListComponent::_getLimit (   $iStart)
protected

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

Parameters
int$iStartstart position
Returns
string

Definition at line 351 of file ajaxlistcomponent.php.

ajaxListComponent::_getQueryCols ( )
protected

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

Returns
string

Reimplemented in discount_item_ajax.

Definition at line 264 of file ajaxlistcomponent.php.

ajaxListComponent::_getSortCol ( )
protected

Returns column id to sort

Returns
int

Definition at line 177 of file ajaxlistcomponent.php.

ajaxListComponent::_getSortDir ( )
protected

Checks user input and returns SQL sorting direction key

Returns
string

Definition at line 449 of file ajaxlistcomponent.php.

ajaxListComponent::_getSorting ( )
protected

Formats and returns part of SQL query for sorting

Returns
string

Reimplemented in actions_main_ajax, category_order_ajax, actions_order_ajax, selectlist_order_ajax, and attribute_order_ajax.

Definition at line 339 of file ajaxlistcomponent.php.

ajaxListComponent::_getStartIndex ( )
protected

Returns position from where data must be loaded

Returns
int

Definition at line 464 of file ajaxlistcomponent.php.

ajaxListComponent::_getTotalCount (   $sQ)
protected

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

Parameters
string$sQSQL query
Returns
int

Definition at line 476 of file ajaxlistcomponent.php.

ajaxListComponent::_getViewName (   $sTable)
protected

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

Parameters
string$sTabletable name
Returns
string

Definition at line 544 of file ajaxlistcomponent.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 231 of file ajaxlistcomponent.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$sColumncolumn name
Returns
bool

Definition at line 307 of file ajaxlistcomponent.php.

ajaxListComponent::_output (   $sOut)
protected

Echoes given string

Parameters
string$sOutstring to echo
Returns
null

Definition at line 532 of file ajaxlistcomponent.php.

ajaxListComponent::_outputResponse (   $aData)
protected

Outputs JSON encoded data

Parameters
array$aDatadata to output
Returns
null

Definition at line 506 of file ajaxlistcomponent.php.

ajaxListComponent::getColumns ( )

Gets columns array.

Returns
array

Definition at line 66 of file ajaxlistcomponent.php.

ajaxListComponent::init (   $aColumns = null)

Initializes AJAX columns.

Parameters
array$aColumnsArray of DB table columns which are loaded from DB.
Deprecated:
since v5.1.1 (2013.10.24); must be replaced with setColumns if needed
Returns
null

Definition at line 54 of file ajaxlistcomponent.php.

ajaxListComponent::processRequest (   $sFunction = null)

AJAX call processor function

Parameters
string$sFunctionname of action to execute (optional)
Returns
null

Definition at line 155 of file ajaxlistcomponent.php.

ajaxListComponent::resetArtSeoUrl (   $aArtIds,
  $aCatIds = null 
)

Marks article seo url as expired

Parameters
array$aArtIdsarticle id's
array$aCatIdsids if categories, which must be removed from oxseo
Returns
null

Definition at line 598 of file ajaxlistcomponent.php.

ajaxListComponent::resetContentCache ( )

Reset output cache

Returns
null

Definition at line 634 of file ajaxlistcomponent.php.

ajaxListComponent::resetCounter (   $sCounterType,
  $sValue = null 
)

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

Parameters
string$sCounterTypecounter type
string$sValuereset value
Returns
null

Definition at line 653 of file ajaxlistcomponent.php.

ajaxListComponent::setColumns (   $aColumns)

Sets columns array.

Parameters
array$aColumnscolumns array
Returns
null

Definition at line 78 of file ajaxlistcomponent.php.

ajaxListComponent::setName (   $sName)

AJAX container name setter

Parameters
string$sNamename of container
Returns
null

Definition at line 109 of file ajaxlistcomponent.php.

Member Data Documentation

ajaxListComponent::$_aColumns = array()
protected

Definition at line 21 of file ajaxlistcomponent.php.

ajaxListComponent::$_aPosDir = array( 'asc', 'desc' )
protected

Definition at line 14 of file ajaxlistcomponent.php.

ajaxListComponent::$_blAllowExtColumns = false
protected

Definition at line 43 of file ajaxlistcomponent.php.

ajaxListComponent::$_iSqlLimit = 2500
protected

Definition at line 28 of file ajaxlistcomponent.php.

ajaxListComponent::$_sContainer = null
protected

Definition at line 35 of file ajaxlistcomponent.php.


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