Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
deconverter.php
1<?php
2
4
13final class DeConverter extends BaseConverter
14{
16 private const LAND_ADMIN_LEVEL = 4;
17
23 private const BERLIN_LAND_RELATION_ID = 62422;
24
30 private const HAMBURG_LAND_RELATION_ID = 62782;
31
35 protected function getAdminLevel1(): ?array
36 {
37 foreach ($this->addressComponents as $addressComponent)
38 {
39 if ($this->isAdministrativeBoundary($addressComponent)
40 && $addressComponent['admin_level'] === static::LAND_ADMIN_LEVEL
41 )
42 {
43 return $addressComponent;
44 }
45 }
46
47 return null;
48 }
49
53 protected function getCityStateRelationIds(): array
54 {
55 return [
56 static::BERLIN_LAND_RELATION_ID,
57 static::HAMBURG_LAND_RELATION_ID,
58 ];
59 }
60}