Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
helper.php
1<?php
2
4
6
7class Helper
8{
13 public static function getDomain(): string
14 {
15 if (\CCalendar::isBitrix24())
16 {
17 return 'https://bitrix24.com';
18 }
19
20 if (defined('BX24_HOST_NAME') && BX24_HOST_NAME)
21 {
22 return "https://" . BX24_HOST_NAME;
23 }
24
25 $server = Application::getInstance()->getContext()->getServer();
26
27 return "https://" . $server['HTTP_HOST'];
28 }
29}