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

