• Модуль: sale
  • Путь к файлу: ~/bitrix/modules/sale/lib/tradingplatform/vk/feed/data/sources/section.php
  • Класс: BitrixSaleTradingPlatformVkFeedDataSourcesSection
  • Вызов: Section::__construct
public function __construct($exportId, $startPosition)
{
	$this->vk = VkVk::getInstance();

	if (!$this->vk->isActive())
		throw new SystemException("Vk is not active!" . __METHOD__);

	if (!isset($exportId) || $exportId == '')
		throw new ArgumentNullException("EXPORT_ID");

	if (!Loader::includeModule('iblock'))
		throw new SystemException("Can't include module "IBlock"! " . __METHOD__);

	$this->exportId = $exportId;

//		get list of sections to export IDs
	$sectionsList = new VkSectionsList($this->exportId);
	$preparedSections = $sectionsList->getSectionsToAlbumsExport();
	$this->sectionsToExport = $preparedSections["SECTIONS"];
	$this->sectionsAliases = $preparedSections["ALIASES"];
	unset($preparedSections);

//		CHECK is empty list
	if (empty($this->sectionsToExport))
	{
		$logger = new VkLogger($this->exportId);
		$logger->addError('EMPTY_SECTIONS_LIST');
	}

	$this->setStartPosition($startPosition);
}