1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
devicetype.php
См. документацию.
1
<?php
2
9
10
namespace
Bitrix\Main\Web\UserAgent;
11
12
use Bitrix\Main\Localization\Loc;
13
14
class
DeviceType
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
}
Bitrix\Main\Web\UserAgent\DeviceType
Определения
devicetype.php:15
Bitrix\Main\Web\UserAgent\DeviceType\MOBILE_PHONE
const MOBILE_PHONE
Определения
devicetype.php:18
Bitrix\Main\Web\UserAgent\DeviceType\DESKTOP
const DESKTOP
Определения
devicetype.php:17
Bitrix\Main\Web\UserAgent\DeviceType\TV
const TV
Определения
devicetype.php:20
Bitrix\Main\Web\UserAgent\DeviceType\TABLET
const TABLET
Определения
devicetype.php:19
Bitrix\Main\Web\UserAgent\DeviceType\UNKNOWN
const UNKNOWN
Определения
devicetype.php:16
Bitrix\Main\Web\UserAgent\DeviceType\getDescription
static getDescription($lang=null)
Определения
devicetype.php:22
array
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения
file_new.php:804
$description
if(Loader::includeModule( 'bitrix24')) elseif(Loader::includeModule('intranet') &&CIntranetUtils::getPortalZone() !=='ru') $description
Определения
.description.php:24
$lang
if(!defined('SITE_ID')) $lang
Определения
include.php:91
bitrix
modules
main
lib
web
useragent
devicetype.php
Создано системой
1.14.0