|
OXID eShop CE
6.1.5
|
Inheritance diagram for OxidEsales\EshopCommunity\Core\Model\ListModel:
Collaboration diagram for OxidEsales\EshopCommunity\Core\Model\ListModel: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 () | |
| setBaseObject ($oObject) | |
| selectString ($sql, array $parameters=[]) | |
| add ($oObject) | |
| assignArray ($aData) | |
| setSqlLimit ($iStart, $iRecords) | |
| containsFieldValue ($oVal, $sFieldName) | |
| getList () | |
Protected Member Functions | |
| _assignElement ($oListObject, $aDbFields) | |
| _getFieldLongName ($sFieldName) | |
Protected Attributes | |
| $_aArray = [] | |
| $_blRemovedActive = false | |
| $_sObjectsInListName = 'oxBase' | |
| $_sCoreTable = null | |
| $_sShopID = null | |
| $_aSqlLimit = [] | |
Private Attributes | |
| $_oBaseObject = null | |
| $_blValid = true | |
List manager. Collects list data (eg. from DB), performs list changes updating (to DB), etc.
| OxidEsales\EshopCommunity\Core\Model\ListModel::__construct | ( | $sObjectName = null | ) |
Class Constructor
| string | $sObjectName | Associated list item object type |
| OxidEsales\EshopCommunity\Core\Model\ListModel::__get | ( | $sName | ) |
Backward compatibility method
| string | $sName | Variable name |
|
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).
|
protected |
| OxidEsales\EshopCommunity\Core\Model\ListModel::add | ( | $oObject | ) |
Add an entry to object array.
| object | $oObject | Object to be added. |
| OxidEsales\EshopCommunity\Core\Model\ListModel::arrayKeys | ( | ) |
Returns SPL array keys
| OxidEsales\EshopCommunity\Core\Model\ListModel::assign | ( | $aArray | ) |
copies a given array over the objects internal array (something like old $myList->aList = $aArray)
| array | $aArray | array of list items |
| OxidEsales\EshopCommunity\Core\Model\ListModel::assignArray | ( | $aData | ) |
Assign data from array to list
| array | $aData | data for list |
| OxidEsales\EshopCommunity\Core\Model\ListModel::clear | ( | ) |
clears/destroys list contents
| OxidEsales\EshopCommunity\Core\Model\ListModel::containsFieldValue | ( | $oVal, | |
| $sFieldName | |||
| ) |
Function checks if there is at least one object in the list which has the given value in the given field
| mixed | $oVal | The searched value |
| string | $sFieldName | The name of the field, give "oxid" will access the classname__oxid field |
| OxidEsales\EshopCommunity\Core\Model\ListModel::count | ( | ) |
count for SPL
| OxidEsales\EshopCommunity\Core\Model\ListModel::current | ( | ) |
current for SPL
| OxidEsales\EshopCommunity\Core\Model\ListModel::getArray | ( | ) |
Returns list items array
| OxidEsales\EshopCommunity\Core\Model\ListModel::getBaseObject | ( | ) |
Initializes or returns existing list template object.
| OxidEsales\EshopCommunity\Core\Model\ListModel::getList | ( | ) |
Generic function for loading the list
| OxidEsales\EshopCommunity\Core\Model\ListModel::init | ( | $sObjectName, | |
$sCoreTable = null |
|||
| ) |
Inits list table name and object name.
| string | $sObjectName | List item object type |
| string | $sCoreTable | Db table name this list s selected from |
| OxidEsales\EshopCommunity\Core\Model\ListModel::key | ( | ) |
key for SPL
| OxidEsales\EshopCommunity\Core\Model\ListModel::next | ( | ) |
next for SPL
| OxidEsales\EshopCommunity\Core\Model\ListModel::offsetExists | ( | $offset | ) |
Implementation of SPL Array classes functions follows here
implementation of abstract classes for ArrayAccess followoffsetExists for SPL
| mixed | $offset | SPL array offset |
| OxidEsales\EshopCommunity\Core\Model\ListModel::offsetGet | ( | $offset | ) |
| OxidEsales\EshopCommunity\Core\Model\ListModel::offsetSet | ( | $offset, | |
| $oBase | |||
| ) |
offsetSet for SPL
| mixed | $offset | SPL array offset |
| BaseModel | $oBase | Array element |
| OxidEsales\EshopCommunity\Core\Model\ListModel::offsetUnset | ( | $offset | ) |
offsetUnset for SPL
| mixed | $offset | SPL array offset |
| OxidEsales\EshopCommunity\Core\Model\ListModel::prev | ( | ) |
previous / first array element
| OxidEsales\EshopCommunity\Core\Model\ListModel::reverse | ( | ) |
returns the array reversed, the internal array remains untouched
| OxidEsales\EshopCommunity\Core\Model\ListModel::rewind | ( | ) |
rewind for SPL
| OxidEsales\EshopCommunity\Core\Model\ListModel::selectString | ( | $sql, | |
| array | $parameters = [] |
||
| ) |
Convert results of the given select statement into objects and store them in _aArray.
Developers are encouraged to use prepared statements like this: $sql = 'SELECT * FROM mytable WHERE oxid = ?'; $parameters = ['MYOXID'] selectString($sql, $parameters)
| string | $sql | SQL select statement or prepared statement |
| array | $parameters | Parameters to be used in a prepared statement |
| OxidEsales\EshopCommunity\Core\Model\ListModel::setBaseObject | ( | $oObject | ) |
Sets base object for list.
| object | $oObject | Base object |
| OxidEsales\EshopCommunity\Core\Model\ListModel::setSqlLimit | ( | $iStart, | |
| $iRecords | |||
| ) |
Sets SQL Limit
| integer | $iStart | Start e.g. limit Start,xxxx |
| integer | $iRecords | Nr of Records e.g. limit xxx,Records |
| OxidEsales\EshopCommunity\Core\Model\ListModel::valid | ( | ) |
valid for SPL
|
protected |
Array of objects (some object list).
|
protected |
|
protected |
Save the state, that active element was unset needed for proper foreach iterator functionality
|
private |
Flag if array is ok or not
|
private |
|
protected |
|
protected |
|
protected |