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
canBuy()changeCurrency()Изменяет валюту элемента корзины.clearStartField()create()createBundleCollection()delete()doFinalAction()findItemByBasketCode()findItemById()findItemByXmlId()formatQuantity()getAllFields()
setCollection() есть и у других классов модуля «Интернет-магазин»: BasketItemBase, BasketPropertyItem, BasketPropertyItemBase, CollectableEntity, Shipment, ShipmentItem, ShipmentItemStore.
Исходный файл: source/sale/lib/basketitem.php:38

