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

Public Member Functions

 offsetExists ($offset)
 offsetGet ($offset)
 offsetSet ($offset, $oBase)
 offsetUnset ($offset)
 arrayKeys ()
 rewind ()
 current ()
 key ()
 prev ()
 next ()
 valid ()
 count ()
 clear ()
 assign ($aArray)
 reverse ()
 __construct ($sObjectName=null)
 __get ($sName)
 getArray ()
 init ($sObjectName, $sCoreTable=null)
 getBaseObject ()
 selectString ($sSql)
 assignArray ($aData)
 setSqlLimit ($iStart, $iRecords)
 containsFieldValue ($oVal, $sFieldName)
 getList ()
- 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

 _assignElement ($oListObject, $aDbFields)
 _getFieldLongName ($sFieldName)

Protected Attributes

 $_aArray = array()
 $_blRemovedActive = false
 $_sObjectsInListName = 'oxBase'
 $_sCoreTable = null
 $_sShopID = null
 $_aSqlLimit = array()

Private Attributes

 $_oBaseObject = null
 $_blValid = true

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

List manager. Collects list data (eg. from DB), performs list changes updating (to DB), etc.

Definition at line 7 of file oxlist.php.

Constructor & Destructor Documentation

oxList::__construct (   $sObjectName = null)

Class Constructor

Parameters
string$sObjectNameAssociated list item object type

Reimplemented in oxContentList, oxCategoryList, oxDeliveryList, oxDeliverySetList, oxManufacturerList, oxVendorList, oxDiscountList, oxPaymentList, oxCountryList, oxShopList, oxAttributeList, and oxUserList.

Definition at line 287 of file oxlist.php.

Member Function Documentation

oxList::__get (   $sName)

Backward compatibility method

Parameters
string$sNameVariable name
Returns
mixed

Reimplemented in oxCategoryList.

Definition at line 306 of file oxlist.php.

oxList::_assignElement (   $oListObject,
  $aDbFields 
)
protected

Executes assign() method on list object. This method is called in loop in oxList::selectString(). It is if you want to execute any functionality on every list ELEMENT after it is fully loaded (assigned).

Parameters
oxBase$oListObjectList object (the one derived from oxBase)
array$aDbFieldsAn array holding db field values (normally the result of oxDb::Execute())
Returns
null;

Reimplemented in oxSimpleVariantList.

Definition at line 483 of file oxlist.php.

oxList::_getFieldLongName (   $sFieldName)
protected

Returns field long name

Parameters
string$sFieldNameField name
Returns
string

Definition at line 495 of file oxlist.php.

oxList::arrayKeys ( )

Returns SPL array keys

Returns
array

Definition at line 127 of file oxlist.php.

oxList::assign (   $aArray)

copies a given array over the objects internal array (something like old $myList->aList = $aArray)

Parameters
array$aArrayarray of list items
Returns
null

Definition at line 237 of file oxlist.php.

oxList::assignArray (   $aData)

Assign data from array to list

Parameters
array$aDatadata for list
Returns
null;

Definition at line 402 of file oxlist.php.

oxList::clear ( )

clears/destroys list contents

Returns
null;

Definition at line 220 of file oxlist.php.

oxList::containsFieldValue (   $oVal,
  $sFieldName 
)

Function checks if there is at least one object in the list which has the given value in the given field

Parameters
mixed$oValThe searched value
string$sFieldNameThe name of the field, give "oxid" will access the classname__oxid field
Returns
boolean

Definition at line 444 of file oxlist.php.

oxList::count ( )

count for SPL

Returns
integer

Definition at line 210 of file oxlist.php.

oxList::current ( )

current for SPL

Returns
null;

Definition at line 148 of file oxlist.php.

oxList::getArray ( )

Returns list items array

Returns
array

Definition at line 318 of file oxlist.php.

oxList::getBaseObject ( )

Initializes or returns existing list template object.

Returns
oxBase

Definition at line 344 of file oxlist.php.

oxList::getList ( )

Generic function for loading the list

Returns
null;

Definition at line 461 of file oxlist.php.

oxList::init (   $sObjectName,
  $sCoreTable = null 
)

Inits list table name and object name.

Parameters
string$sObjectNameList item object type
string$sCoreTableDb table name this list s selected from
Returns
null;

Definition at line 331 of file oxlist.php.

oxList::key ( )

key for SPL

Returns
mixed

Definition at line 158 of file oxlist.php.

oxList::next ( )

next for SPL

Returns
null;

Definition at line 184 of file oxlist.php.

oxList::offsetExists (   $offset)

Implementation of SPL Array classes functions follows here


implementation of abstract classes for ArrayAccess follow offsetExists for SPL

Parameters
mixed$offsetSPL array offset
Returns
boolean

Definition at line 56 of file oxlist.php.

oxList::offsetGet (   $offset)

offsetGet for SPL

Parameters
mixed$offsetSPL array offset
Returns
oxBase

Definition at line 72 of file oxlist.php.

oxList::offsetSet (   $offset,
  $oBase 
)

offsetSet for SPL

Parameters
mixed$offsetSPL array offset
oxBase$oBaseArray element
Returns
null;

Definition at line 89 of file oxlist.php.

oxList::offsetUnset (   $offset)

offsetUnset for SPL

Parameters
mixed$offsetSPL array offset
Returns
null;

Definition at line 112 of file oxlist.php.

oxList::prev ( )

previous / first array element

Returns
mixed

Definition at line 168 of file oxlist.php.

oxList::reverse ( )

returns the array reversed, the internal array remains untouched

Returns
array

Definition at line 247 of file oxlist.php.

oxList::rewind ( )

rewind for SPL

Returns
null;

Definition at line 137 of file oxlist.php.

oxList::selectString (   $sSql)

Selects and SQL, creates objects and assign them

Parameters
string$sSqlSQL select statement
Returns
null;

Reimplemented in oxArticleList.

Definition at line 362 of file oxlist.php.

oxList::setSqlLimit (   $iStart,
  $iRecords 
)

Sets SQL Limit

Parameters
integer$iStartStart e.g. limit Start,xxxx
integer$iRecordsNr of Records e.g. limit xxx,Records
Returns
null;

Definition at line 430 of file oxlist.php.

oxList::valid ( )

valid for SPL

Returns
boolean

Definition at line 200 of file oxlist.php.

Member Data Documentation

array oxList::$_aArray = array()
protected

Array of objects (some object list).

Definition at line 14 of file oxlist.php.

oxList::$_aSqlLimit = array()
protected

Definition at line 280 of file oxlist.php.

bool oxList::$_blRemovedActive = false
protected

Save the state, that active element was unset needed for proper foreach iterator functionality

Definition at line 22 of file oxlist.php.

boolean oxList::$_blValid = true
private

Flag if array is ok or not

Definition at line 36 of file oxlist.php.

oxList::$_oBaseObject = null
private

Definition at line 29 of file oxlist.php.

oxList::$_sCoreTable = null
protected

Definition at line 270 of file oxlist.php.

oxList::$_sObjectsInListName = 'oxBase'
protected

Definition at line 263 of file oxlist.php.

oxList::$_sShopID = null
protected

Definition at line 275 of file oxlist.php.


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