Documentation

BasketItemCollection

\Bitrix\Sale\BasketItemCollection handles an items collection.


Chain of descendants (within subspace \Bitrix\Sale)

BasketItemCollection >  Internals\EntityCollection > Internals\CollectionBase

Class methods

MethodDescription Available from version
createItemCreates and adds an item into a collection.
getBasketAbstract method. Returns shopping cart with specified collection.
getBasketItemsReturns a items collection.
getExistsItemReturns an item from collection (or null).
getItemByBasketCodeReturns an item from collection by item code.
getItemByIdReturns an item from collection by item ID.
getOrderReturns order, associated to shopping cart.
getOrderIdReturns order ID with collection.
loadFromArrayLoads items from array.

Methods from parent class \Bitrix\Sale\Internals\EntityCollection

MethodDescription Available from version
clearCollectionDeletes all collection items.
doFinalActionExecutes final actions.
getIndexByIdSearches item in collection by ID and returns its internal index.
getItemByIdSearches item in collection by ID and returns it.
getItemByIndexSearches item in collection by internal index and returns it.
isAnyItemDeletedChecks if a collection item was deleted.
isChangedChecks if collection was updated. Returns true or false.
isCloneChecks if collection was cloned. Returns true or false.
verifyVerifies collection validly. Returns object \Bitrix\Sale\Result.

Methods for parent class \Bitrix\Sale\Internals\CollectionBase

MethodDescription Available from version
countReturns number of object items.
currentReturns current item.
getIteratorReturns external iterator.
isEmptyChecks collection for emptiness. When collection doesn't contain any items, returns true (otherwise, false).
keyReturns index for current collection item.
nextMoves collection selection to the next item.
offsetExistsDefines, if specified offset exists (key).
offsetGetReturns specified offset (key).
offsetSetSets value for this offset.
offsetUnsetResets offset value.
rewindRewinds selection to the first collection item.
validChecks, if collection contains valid items.


© «Bitrix24», 2001-2024
Up