• Модуль: rest
  • Путь к файлу: ~/bitrix/modules/rest/lib/configuration/action/import.php
  • Класс: BitrixRestConfigurationActionImport
  • Вызов: Import::doStart
public function doStart($app = null, string $mode = Helper::MODE_IMPORT, array $option = []): array
{
	$result = [
		'finish' => true,
	];

	$section = Controller::getEntityCodeList();
	$result['section'] = array_values($section);

	if (!is_array($app) && $app !== null)
	{
		$app = BitrixRestAppTable::getByClientId($app);
	}

	if (is_array($app))
	{
		$this->getSetting()->set(Setting::SETTING_APP_INFO, $app);
	}

	if (!empty($option['UNINSTALL_APP_ON_FINISH']))
	{
		$this->getSetting()->set(Setting::SETTING_UNINSTALL_APP_CODE, $option['UNINSTALL_APP_ON_FINISH']);
	}

	return $result;
}