method
public
BasketItemCollection::getBasketItems()
Сигнатура
public getBasketItems() : array<string|int, mixed>
Возвращаемое значение
array<string|int, mixed>
Как применяется в BasketItemCollection
BasketItemCollection::getBasketItems() — метод класса \Bitrix\Sale\BasketItemCollection модуля «Интернет-магазин».
Метод объекта: сначала нужен экземпляр BasketItemCollection.
use Bitrix\Main\Loader;
use Bitrix\Sale\BasketItemCollection;
Loader::includeModule('sale');
/** @var BasketItemCollection $object */
$result = $object->getBasketItems();
// $result: array<string|int, mixed>Другие методы BasketItemCollection
clearCollection()clearStartField()count()Подсчитывает количество элементов объекта.createItem()current()Возвращает текущий элемент.doFinalAction()getBasket()getContext()getExistsItem()getExistsItems()Получает все элементы корзины для нужных moduleId, productId и свойств.getIndexById()getItemByBasketCode()
getBasketItems() есть и у других классов модуля «Интернет-магазин»: Basket, BasketBase.
Исходный файл: source/sale/lib/basketitemcollection.php:172

