• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/controller/export.php
  • Класс: BitrixMainControllerExport
  • Вызов: Export::init
protected function init()
{
	parent::init();

	Loc::loadMessages(__FILE__);

	$this->isBitrix24 = MainModuleManager::isModuleInstalled('bitrix24');

	$this->isCloudAvailable =
		MainModuleManager::isModuleInstalled('clouds') &&
		MainLoader::includeModule('clouds');

	$this->processToken = $this->request->get('PROCESS_TOKEN');
	$this->exportType = $this->request->get('EXPORT_TYPE');
	$this->componentName = $this->request->get('COMPONENT_NAME');

	$signedParameters = $this->request->getPost('signedParameters');
	if (!empty($signedParameters))
	{
		$this->componentParameters = $this->decodeSignedParameters($this->componentName, $signedParameters);
	}

	$initialOptions = $this->request->getPost('INITIAL_OPTIONS');
	if (!empty($initialOptions))
	{
		$this->componentParameters['STEXPORT_INITIAL_OPTIONS'] = $initialOptions;
	}

	$progressData = $this->getProgressParameters();
	if (!empty($progressData))
	{
		$this->isNewProcess = (empty($progressData['processToken']) || $progressData['processToken'] !== $this->processToken);
		if (!$this->isNewProcess)
		{
			// restore state
			foreach ($this->fieldToStoreInProcess as $fieldName)
			{
				if (isset($progressData[$fieldName]))
				{
					$this->{$fieldName} = $progressData[$fieldName];
				}
			}
		}
	}

	if ($this->isCloudAvailable)
	{
		$bucketList = $this->getBucketList();
		if (empty($bucketList))
		{
			$this->isCloudAvailable = false;
		}
	}
}