method public

EntityCollection::getItemByIndex()

Класс: \Bitrix\Sale\Internals\EntityCollection

Сигнатура

public getItemByIndex(mixed $index) : CollectableEntity|null

Параметры

$index mixed

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

CollectableEntity|null

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

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

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

use Bitrix\Main\Loader;
use Bitrix\Sale\Internals\EntityCollection;

Loader::includeModule('sale');

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

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

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

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

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