• Модуль: sale
  • Путь к файлу: ~/bitrix/modules/sale/lib/location/import/compiler/compiler.php
  • Класс: BitrixSaleLocationImportCompilerCompiler
  • Вызов: Compiler::fiasGotOneMapRootV2
public function fiasGotOneMapRootV2($data)
{
	$item = $data['__ATTR'];

	$type = $item['SHORTNAME'];
	$name = $this->makeNameIndexKey($item['FORMALNAME']);

	if($this->sysMaps['FIAS2BASETYPE'][$type] == 'REGION') // this is fias-region
	{
		$result = array();
		foreach($this->data['MAPS']['REGIONS'] as $id => &$node)
		{
			$rName = $this->makeNameIndexKey($node['NAME']['RU']['NAME']);

			if($rName == $name || strpos($rName, $name) !== false)
			{
				$node['MATCH'][] = array(
					'ID' => $item['AOGUID'],
					'NAME' => $item['FORMALNAME'].' '.$item['SHORTNAME']
				);
			}
		}
	}
}