Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
regionfinder.php
1<?php
2
4
6
12{
17 public static function getCurrentRegion(): string
18 {
19 $result = null;
20
21 if (Loader::includeModule('bitrix24'))
22 {
23 $licensePrefix = \CBitrix24::getLicensePrefix();
24 if ($licensePrefix !== false)
25 {
26 $result = (string)$licensePrefix;
27 }
28 }
29 elseif (Loader::includeModule('intranet'))
30 {
31 $result = (string)\CIntranetUtils::getPortalZone();
32 }
33 elseif (defined('LANGUAGE_ID'))
34 {
35 $result = LANGUAGE_ID;
36 }
37
38 if (!$result)
39 {
40 $result = 'en';
41 }
42
43 return $result;
44 }
45}