• Модуль: catalog
  • Путь к файлу: ~/bitrix/modules/catalog/lib/v2/Section/SectionRepository.php
  • Класс: BitrixCatalogv2SectionSectionRepository
  • Вызов: SectionRepository::getListByProductId
protected function getListByProductId(int $productId): array
{
	$result = [];

	$sectionIdsIterator = CIBlockElement::getElementGroups(
		$productId,
		true,
		['ID']
	);
	while ($section = $sectionIdsIterator->fetch())
	{
		$result[] = [
			'VALUE' => (int)$section['ID'],
		];
	}

	return $result;
}