• Модуль: sale
  • Путь к файлу: ~/bitrix/modules/sale/lib/location/import/compiler/compiler.php
  • Класс: BitrixSaleLocationImportCompilerCompiler
  • Вызов: Compiler::generateDemoFilesWorld
public function generateDemoFilesWorld($item, $table)
{
	if(!isset($this->allowedForDemo[$item['TYPE_CODE']]))
		return;

	if($item['TYPE_CODE'] == 'COUNTRY')
	{
		$this->addItemToCSV('world', 'demo', $item);

		// this part must not depend on codes, which may flow left and right. in future we may add 
		// some markers like "is_ukrain" or "is_russia" etc to database instead of relying on names
		if($item['NAME'] == 'Україна')
			$this->demoCategory = 'ukrain';
		elseif($item['NAME'] == 'Казахстан')
			$this->demoCategory = 'kazakhstan';
		elseif($item['NAME'] == 'Беларусь')
			$this->demoCategory = 'belarus';
		elseif($item['NAME'] == 'США')
			$this->demoCategory = 'usa';
		else
			$this->demoCategory = false;
	}

	//$this->output($table->getWalkPathString());
	//$this->output($this->demoCategory);

	if($this->demoCategory !== false)
		$this->addItemToCSV($this->demoCategory, 'demo', $item);
}