method
public
BasketPropertiesCollection::getItemById()
Сигнатура
public getItemById(mixed $id) : CollectableEntity|null
Параметры
$id
mixed
Возвращаемое значение
CollectableEntity|null
Как применяется в BasketPropertiesCollection
BasketPropertiesCollection::getItemById() — метод класса \Bitrix\Sale\BasketPropertiesCollection модуля «Интернет-магазин».
Метод объекта: сначала нужен экземпляр BasketPropertiesCollection.
use Bitrix\Main\Loader;
use Bitrix\Sale\BasketPropertiesCollection;
Loader::includeModule('sale');
/** @var BasketPropertiesCollection $object */
$id = null;
$result = $object->getItemById($id);
// $result: CollectableEntity|nullДругие методы BasketPropertiesCollection
clearCollection()clearStartField()count()Подсчитывает количество элементов объекта.createItem()current()Возвращает текущий элемент.doFinalAction()getBasketItem()getIndexById()getItemByIndex()getIterator()getList()Загружает свойства элемента корзины.getPropertyItemByValue()
getItemById() есть и у других классов модуля «Интернет-магазин»: Basket, BasketBase, BasketItemCollection, BasketPropertiesCollectionBase, EntityCollection, ShipmentCollection, ShipmentItemCollection, ShipmentItemStoreCollection.
Исходный файл: source/sale/lib/basketproperties.php:175

