Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
devicetype.php
1<?php
2
11
13
15{
16 public const UNKNOWN = 0;
17 public const DESKTOP = 1;
18 public const MOBILE_PHONE = 2;
19 public const TABLET = 3;
20 public const TV = 4;
21
22 public static function getDescription($lang = null): array
23 {
24 static $description = [];
25
26 if (!isset($description[$lang ?? '']))
27 {
28 $description[$lang ?? ''] = [
29 self::UNKNOWN => Loc::getMessage('main_devicetype_unknown', null, $lang),
30 self::DESKTOP => Loc::getMessage('main_devicetype_desktop', null, $lang),
31 self::MOBILE_PHONE => Loc::getMessage('main_devicetype_phone', null, $lang),
32 self::TABLET => Loc::getMessage('main_devicetype_tablet', null, $lang),
33 self::TV => Loc::getMessage('main_devicetype_tv', null, $lang),
34 ];
35 }
36
37 return $description[$lang ?? ''];
38 }
39}
static getMessage($code, $replace=null, $language=null)
Definition loc.php:29