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

