• Модуль: sale
  • Путь к файлу: ~/bitrix/modules/sale/lib/tradingplatform/vk/sectionslist.php
  • Класс: BitrixSaleTradingPlatformVkSectionsList
  • Вызов: SectionsList::getSectionsSelector
public function getSectionsSelector($checkedSection = null, $onlyMapped = true)
{
//		old variant - get iblocks from map. Will work only when we check at least one section
//		new variant - show ALL iblock in list
	$iblockIds = $this->getIblockIds($onlyMapped);

//		get mapped sections for checking activity
	$sectionsTree = $this->getSections(true, $onlyMapped);

	$result = '';
	$result .= '';
	foreach ($iblockIds as $iblockId)
	{
		if (!isset($sectionsTree[$iblockId]))
		{
			continue;
		}
		$iblock = CIBlock::GetByID($iblockId)->GetNext();

		$result .= '';

//			create ITEMS for current iblock
		foreach ($sectionsTree[$iblockId] as $bxCategory)
		{
			$selected = $checkedSection == $bxCategory["ID"] ? ' selected' : '';
			$result .=
				'' .
				str_repeat('. ', $bxCategory["DEPTH_LEVEL"]) . $bxCategory["NAME"] .
				'';
		}
	}

	return $result;
}