• Модуль: location
  • Путь к файлу: ~/bitrix/modules/location/lib/infrastructure/service/disputedareaservice.php
  • Класс: BitrixLocationInfrastructureServiceDisputedAreaService
  • Вызов: DisputedAreaService::getDisputeByPoint
public function getDisputeByPoint(Point $point): ?Dispute
{
	$this->loadDisputedAreas();

	foreach ($this->disputedAreas as $disputedArea)
	{
		if (!$disputedArea->containsPoint($point))
		{
			continue;
		}

		$className = null;
		switch ($disputedArea->getCode())
		{
			case self::CODE_CRIMEA:
				$className = CrimeaDispute::class;
				break;
			case self::CODE_SEVASTOPOL:
				$className = SevastopolDispute::class;
				break;
		}

		if (!$className)
		{
			continue;
		}

		return new $className();
	}

	return null;
}