method public

BasketItem::setCollection()

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

Сигнатура

public setCollection(EntityCollection $collection) : mixed

Параметры

$collection EntityCollection

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

mixed

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

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

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

use Bitrix\Main\Loader;
use Bitrix\Sale\BasketItem;

Loader::includeModule('sale');

/** @var BasketItem $object */
$collection = null; // EntityCollection
$result = $object->setCollection($collection);
// $result: mixed

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

setCollection() есть и у других классов модуля «Интернет-магазин»: BasketItemBase, BasketPropertyItem, BasketPropertyItemBase, CollectableEntity, Shipment, ShipmentItem, ShipmentItemStore.

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

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