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

