1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
mobile.php
См. документацию.
1<?php
3
5{
19 public static function OnBeforeAdminMobileMenuBuild()
20 {
21 global $USER;
22
23 if ($USER->CanDoOperation('bitrixcloud_monitoring'))
24 {
26 'text' => GetMessage('BCL_MON_MOB_INSPECTOR'),
27 'type' => 'section',
28 'sort' => 300,
29 'items' => [
30 [
31 'text' => GetMessage('BCL_MON_MOB_MENU_IPAGE'),
32 'data-url' => '/bitrix/admin/mobile/bitrixcloud_monitoring_ipage.php',
33 'data-pageid' => 'bitrix_cloud_monitoring_info',
34 'push-param' => 'bc'
35 ],
36 [
37 'text' => GetMessage('BCL_MON_MOB_MENU_PUSH'),
38 'data-url' => '/bitrix/admin/mobile/bitrixcloud_monitoring_push.php',
39 'data-pageid' => 'bitrix_cloud_monitoring_push',
40 ],
41 ],
42 ]);
43 }
44 }
45
46 public static function getUserDevices($userId)
47 {
48 $arResult = [];
49
50 if (CModule::IncludeModule('pull'))
51 {
52 $dbres = \Bitrix\Pull\Model\PushTable::getList([
53 'filter' => [
54 'USER_ID' => $userId,
55 ],
56 ]);
57 while ($arDb = $dbres->fetch())
58 {
59 if ($arDb['DEVICE_TYPE'] == 'APPLE')
60 {
61 CModule::IncludeModule('mobileapp');
63
64 $protocol = 2;
65 }
66 else
67 {
68 $protocol = 3;
69 }
70
71 $arResult[] = $arDb['DEVICE_TOKEN'] . ':' . $protocol . ':BitrixAdmin';
72 }
73 }
74
75 return $arResult;
76 }
77}
$arResult
Определения generate_coupon.php:16
if(!is_object($USER)||! $USER->IsAuthorized()) $userId
Определения check_mail.php:18
static Init()
Определения mobile.php:199
static addItem($arItem)
Определения interface.php:7
Определения mobile.php:5
static OnBeforeAdminMobileMenuBuild()
Определения mobile.php:19
static getUserDevices($userId)
Определения mobile.php:46
$protocol
Определения .description.php:9
global $USER
Определения csv_new_run.php:40
IncludeModuleLangFile($filepath, $lang=false, $bReturnArray=false)
Определения tools.php:3778
GetMessage($name, $aReplace=null)
Определения tools.php:3397