• Модуль: location
  • Путь к файлу: ~/bitrix/modules/location/lib/repository/location/database.php
  • Класс: BitrixLocationRepositoryLocationDatabase
  • Вызов: Database::obtainLocationKeys
protected function obtainLocationKeys(Location $location): array
{
	$result = [0, ''];

	$query = $this->locationTable::query()
		->where('EXTERNAL_ID', $location->getExternalId())
		->where('SOURCE_CODE', $location->getSourceCode())
		->addSelect('ID')
		->addSelect('CODE');

	if($res = $query->fetch())
	{
		$result = [(int)$res['ID'], (string)$res['CODE']];
	}

	return $result;
}