• Модуль: catalog
  • Путь к файлу: ~/bitrix/modules/catalog/lib/v2/IoC/ServiceContainer.php
  • Класс: BitrixCatalogv2IoCServiceContainer
  • Вызов: ServiceContainer::getProductRepository
static function getProductRepository(int $iblockId): ?ProductRepositoryContract
{
	$iblockInfo = static::getIblockInfo($iblockId);

	if ($iblockInfo)
	{
		$iblockId = $iblockInfo->getProductIblockId();

		return static::make(Dependency::PRODUCT_REPOSITORY, compact('iblockId'));
	}

	return null;
}