• Модуль: sale
  • Путь к файлу: ~/bitrix/modules/sale/lib/location/migration/migrate.php
  • Класс: BitrixSaleLocationMigrationCUpdaterLocationPro
  • Вызов: CUpdaterLocationPro::insertNames
private function insertNames()
{
	$handle = new BlockInserter(array(
		'entityName' => 'BitrixSaleLocationNameLocationTable',
		'exactFields' => array('LOCATION_ID', 'LANGUAGE_ID', 'NAME', 'SHORT_NAME', 'NAME_UPPER'),
		'parameters' => array(
			//'autoIncrementFld' => 'ID',
			'mtu' => 9999
		)
	));

	if(is_array($this->data['NAME']) && !empty($this->data['NAME']))
	{
		foreach($this->data['NAME'] as $id => $nameLang)
		{
			if(is_array($nameLang))
			{
				foreach($nameLang as $lang => $name)
				{
					$handle->insert(array(
						'LOCATION_ID' => $id,
						'LANGUAGE_ID' => $lang,
						'NAME' => $name['NAME'],
						'NAME_UPPER' => ToUpper($name['NAME']),
						'SHORT_NAME' => $name['SHORT_NAME']
					));
				}
			}
		}
	}

	$handle->flush();
}