BasketItemCollection extends EntityCollection
AbstractYes
Class BasketItemCollection
Table of Contents
Methods
- clearCollection() : mixed
- clearStartField() : bool
- count() : int
- Count elements of an object
- createItem() : BasketItemBase
- current() : mixed
- Return the current element
- doFinalAction() : Result
- getBasket() : BasketBase
- getBasketItems() : array<string|int, mixed>
- getContext() : array<string|int, mixed>
- getExistsItem() : BasketItem|null
- getExistsItems() : array<string|int, BasketItem>
- Get all basket items for need moduleId, productId and properties.
- getIndexById() : bool|int|null
- getItemByBasketCode() : BasketItemBase|null
- getItemById() : BasketItemBase|null
- getItemByIndex() : CollectableEntity|null
- getItemByXmlId() : BasketItemBase|null
- getIterator() : ArrayIterator
- getOrder() : OrderBase
- getOrderId() : int
- getRegistryType() : string
- hasMeaningfulField() : bool
- isAnyItemAdded() : bool
- isAnyItemDeleted() : bool
- isChanged() : bool
- isClone() : bool
- isEmpty() : bool
- Checks if collection is empty.
- isMathActionOnly() : bool
- isStartField() : bool
- key() : mixed
- Return the key of the current element
- loadFromArray() : mixed
- next() : mixed
- Move forward to next element
- offsetExists() : bool
- Whether a offset exists
- offsetGet() : mixed
- Offset to retrieve
- offsetSet() : void
- Offset to set
- offsetUnset() : void
- Offset to unset
- rewind() : mixed
- Rewind the Iterator to the first element
- setMathActionOnly() : bool
- toArray() : mixed
- valid() : mixed
- Checks if current position is valid
- verify() : Result
Methods
clearCollection()
public
clearCollection() : mixed
Tags
clearStartField()
public
clearStartField() : bool
Return values
boolcount()
Count elements of an object
public
count() : int
Return values
intcreateItem()
public
createItem(mixed $moduleId, mixed $productId[, null $basketCode = null ]) : BasketItemBase
Parameters
- $moduleId : mixed
- $productId : mixed
- $basketCode : null = null
Tags
Return values
BasketItemBasecurrent()
Return the current element
public
current() : mixed
doFinalAction()
public
doFinalAction([bool $hasMeaningfulField = false ]) : Result
Parameters
- $hasMeaningfulField : bool = false
Return values
ResultgetBasket()
public
abstract getBasket() : BasketBase
Return values
BasketBasegetBasketItems()
public
getBasketItems() : array<string|int, mixed>
Return values
array<string|int, mixed>getContext()
public
getContext() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>getExistsItem()
public
getExistsItem(mixed $moduleId, mixed $productId[, array<string|int, mixed> $properties = array() ]) : BasketItem|null
the basket can contain duplicate items. Use method getExistsItems
Get first basket item for need moduleId, productId and properties
Parameters
- $moduleId : mixed
- $productId : mixed
- $properties : array<string|int, mixed> = array()
Tags
Return values
BasketItem|nullgetExistsItems()
Get all basket items for need moduleId, productId and properties.
public
getExistsItems(string $moduleId, int $productId[, array<string|int, mixed>|null $properties = [] ]) : array<string|int, BasketItem>
Parameters
- $moduleId : string
- $productId : int
- $properties : array<string|int, mixed>|null = []
-
if NULL - skips checking properties, even if they are setted in the parameters and/or the basket item.
Return values
array<string|int, BasketItem>getIndexById()
public
getIndexById(mixed $id) : bool|int|null
Parameters
- $id : mixed
Tags
Return values
bool|int|nullgetItemByBasketCode()
public
getItemByBasketCode(mixed $code) : BasketItemBase|null
Parameters
- $code : mixed
Tags
Return values
BasketItemBase|nullgetItemById()
public
getItemById(mixed $id) : BasketItemBase|null
Parameters
- $id : mixed
Tags
Return values
BasketItemBase|nullgetItemByIndex()
public
getItemByIndex(mixed $index) : CollectableEntity|null
Parameters
- $index : mixed
Tags
Return values
CollectableEntity|nullgetItemByXmlId()
public
getItemByXmlId(mixed $xmlId) : BasketItemBase|null
Parameters
- $xmlId : mixed
Tags
Return values
BasketItemBase|nullgetIterator()
public
getIterator() : ArrayIterator
Return values
ArrayIteratorgetOrder()
public
getOrder() : OrderBase
Return values
OrderBasegetOrderId()
public
getOrderId() : int
Return values
intgetRegistryType()
public
static getRegistryType() : string
Tags
Return values
stringhasMeaningfulField()
public
hasMeaningfulField() : bool
Return values
boolisAnyItemAdded()
public
isAnyItemAdded() : bool
Return values
boolisAnyItemDeleted()
public
isAnyItemDeleted() : bool
Return values
boolisChanged()
public
isChanged() : bool
Return values
boolisClone()
public
isClone() : bool
Return values
boolisEmpty()
Checks if collection is empty.
public
isEmpty() : bool
Return values
boolisMathActionOnly()
public
isMathActionOnly() : bool
Return values
boolisStartField()
public
isStartField([bool $isMeaningfulField = false ]) : bool
Parameters
- $isMeaningfulField : bool = false
Return values
boolkey()
Return the key of the current element
public
key() : mixed
loadFromArray()
public
loadFromArray(array<string|int, mixed> $itemList) : mixed
Parameters
- $itemList : array<string|int, mixed>
next()
Move forward to next element
public
next() : mixed
offsetExists()
Whether a offset exists
public
offsetExists(mixed $offset) : bool
Parameters
- $offset : mixed
Return values
booloffsetGet()
Offset to retrieve
public
offsetGet(mixed $offset) : mixed
Parameters
- $offset : mixed
Attributes
- #[ReturnTypeWillChange]
offsetSet()
Offset to set
public
offsetSet(mixed $offset, mixed $value) : void
Parameters
- $offset : mixed
- $value : mixed
offsetUnset()
Offset to unset
public
offsetUnset(mixed $offset) : void
Parameters
- $offset : mixed
rewind()
Rewind the Iterator to the first element
public
rewind() : mixed
setMathActionOnly()
public
setMathActionOnly([bool|false $value = false ]) : bool
Parameters
- $value : bool|false = false
Return values
booltoArray()
public
toArray() : mixed
valid()
Checks if current position is valid
public
valid() : mixed
verify()
public
verify() : Result