method public

BasketPropertiesCollection::getItemByIndex()

Класс: \Bitrix\Sale\BasketPropertiesCollection

Сигнатура

public getItemByIndex(mixed $index) : CollectableEntity|null

Параметры

$index mixed

Возвращаемое значение

CollectableEntity|null

Как применяется в BasketPropertiesCollection

BasketPropertiesCollection::getItemByIndex() — метод класса \Bitrix\Sale\BasketPropertiesCollection модуля «Интернет-магазин».

Метод объекта: сначала нужен экземпляр BasketPropertiesCollection.

use Bitrix\Main\Loader;
use Bitrix\Sale\BasketPropertiesCollection;

Loader::includeModule('sale');

/** @var BasketPropertiesCollection $object */
$index = null;
$result = $object->getItemByIndex($index);
// $result: CollectableEntity|null

Другие методы BasketPropertiesCollection

getItemByIndex() есть и у других классов модуля «Интернет-магазин»: Basket, BasketBase, BasketItemCollection, BasketPropertiesCollectionBase, EntityCollection, ShipmentCollection, ShipmentItemCollection, ShipmentItemStoreCollection.

Исходный файл: source/sale/lib/basketproperties.php:227

Что будем искать? Например,Продвижение