• Модуль: sale
  • Путь к файлу: ~/bitrix/modules/sale/lib/delivery/services/automatic_profile.php
  • Класс: BitrixSaleDeliveryServicesAutomaticProfile
  • Вызов: AutomaticProfile::getConfig
public function getConfig()
{
	if($this->profileConfig === null)
	{
		$configStructure = $this->getConfigStructure();
		$profileConfig = array();

		foreach($configStructure as $key => $configSection)
			$profileConfig[$key] = $this->glueValuesToConfig($configSection, isset($this->config[$key]) ? $this->config[$key] : array());

		if($this->profileId <> '')
		{
			$oldConfig = Automatic::createConfig($this->parentHandlerInitParams, $this->config["MAIN"]["OLD_SETTINGS"] ?? '');
			$newConfig = Automatic::convertOldConfigToNew($oldConfig);

			foreach($newConfig as $groupId => $groupParams)
				if($groupId != $this->profileId)
					unset($newConfig[$groupId]);

			$profileConfig= array_merge($this->config, $profileConfig, $newConfig);
		}

		$this->profileConfig = $profileConfig;
	}

	return $this->profileConfig;
}