• Модуль: sale
  • Путь к файлу: ~/bitrix/modules/sale/lib/tradingplatform/vk/sectionslist.php
  • Класс: BitrixSaleTradingPlatformVkSectionsList
  • Вызов: SectionsList::getToAlbumBySection
public function getToAlbumBySection($sectionId)
{
	$mappedSection = $this->mappedSections[$sectionId];
	$params = $mappedSection["PARAMS"];
	$parentParams = $params["PARENT_SETTINGS"];

//		get params from current section if them enabled
//		or from parent, if them enabled and not INCLUDE_CHILDS
	if (
		(!$params["INHERIT"] && $params["ENABLE"]) ||
		($params["INHERIT"] && $parentParams && $parentParams["ENABLE"] && !$parentParams["INCLUDE_CHILDS"])
	)
	{
		if (isset($params["TO_ALBUM"]) && $params["TO_ALBUM"])
//			get param TO_ALBUM
		{
			return $params["TO_ALBUM"];
		}
		else
//			or add in current album
		{
			return $sectionId;
		}
	}

//		if INHERIT and parent section included childs - put section to parent to_album
	elseif ($params["INHERIT"] && $parentParams && $parentParams["ENABLE"] && $parentParams["INCLUDE_CHILDS"])
	{
		return $parentParams["TO_ALBUM"];
	}

	else
	{
		return 0;
	}
}