• Модуль: sale
  • Путь к файлу: ~/bitrix/modules/sale/lib/location/import/compiler/compiler.php
  • Класс: BitrixSaleLocationImportCompilerCompiler
  • Вызов: Compiler::generateExportTreePutUkrainBundle
private function generateExportTreePutUkrainBundle($bundle)
{
	foreach($bundle as $id)
	{
		$node = $this->data['TREES']['UKRAIN']['NODES'][$id];

		$edges = array();
		if(isset($this->data['TREES']['UKRAIN']['EDGES'][$id]))
			$edges = $this->data['TREES']['UKRAIN']['EDGES'][$id];

		$this->eTreeDB->insert(array(
			'TYPE_CODE' => 		$node['TYPE_CODE'],
			'NAME' => 			$node['NAME']['UA']['NAME'],
			'LANGNAMES' => 		serialize($node['NAME']),
			'EXTERNALS' =>		serialize($node['EXT']),
			'SOURCE' => 		$node['SOURCE'],

			'SYS_CODE' => $this->mapETCodeAsUkrainian($node['ID']),
			'PARENT_SYS_CODE' => strlen($node['PARENT_ID']) ? $this->mapETCodeAsUkrainian($node['PARENT_ID']) : ''
		));

		if(!empty($edges))
			$this->generateExportTreePutUkrainBundle($edges);
	}
}