method public

BasketPropertiesCollectionBase::getIndexById()

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

Сигнатура

public getIndexById(mixed $id) : bool|int|null

Параметры

$id mixed

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

bool|int|null

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

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

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

use Bitrix\Main\Loader;
use Bitrix\Sale\BasketPropertiesCollectionBase;

Loader::includeModule('sale');

/** @var BasketPropertiesCollectionBase $object */
$id = null;
$result = $object->getIndexById($id);
// $result: bool|int|null

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

getIndexById() есть и у других классов модуля «Интернет-магазин»: Basket, BasketBase, BasketItemCollection, BasketPropertiesCollection, EntityCollection, ShipmentCollection, ShipmentItemCollection, ShipmentItemStoreCollection.

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

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