• Модуль: sale
  • Путь к файлу: ~/bitrix/modules/sale/lib/discount/prediction/manager.php
  • Класс: BitrixSaleDiscountPredictionManager
  • Вызов: Manager::extendSectionIds
private function extendSectionIds(array $sectionIds)
{
	if(empty($sectionIds))
	{
		return array();
	}

	$extendedSectionIds = array();

	$query = CIBlockSection::GetList(array(), array(
		'ID' => $sectionIds
	), false, array('IBLOCK_ID', 'ID'));

	while($row = $query->fetch())
	{
		$rsParents = CIBlockSection::getNavChain($row['IBLOCK_ID'], $row['ID'], array('ID'));
		while($arParent = $rsParents->fetch())
		{
			$extendedSectionIds[] = $arParent['ID'];
		}
	}


	return $extendedSectionIds;
}