Product::getIBlockBySectionId

  1. Bitrix24 API (v. 23.675.0)
  2. catalog
  3. Product
  4. getIBlockBySectionId
  • Модуль: catalog
  • Путь к файлу: ~/bitrix/modules/catalog/lib/controller/product.php
  • Класс: BitrixCatalogControllerProduct
  • Вызов: Product::getIBlockBySectionId
protected function getIBlockBySectionId($id): int
{
	$section = CIBlockSection::GetList(
		[],
		[
			'ID' => (int)$id,
		],
		false,
		[
			'ID',
			'IBLOCK_ID',
		]
	);
	$res = $section->Fetch();
	unset($section);

	return (int)($res['IBLOCK_ID'] ?? 0);
}

Добавить комментарий