1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
im_notify_schema.php
См. документацию.
1<?php
2
4
6
8{
9 protected static $arNotifySchema = null;
10
11 public function __construct()
12 {
13 }
14
15 public static function GetNotifySchema()
16 {
17 if (is_null(self::$arNotifySchema))
18 {
19 self::$arNotifySchema = Notification::getDefaultSettings();
20 }
21
22 return self::$arNotifySchema;
23 }
24
25 public static function CheckDisableFeature($moduleId, $notifyEvent, $feature)
26 {
27 return (new Notification($moduleId, $notifyEvent))->checkDisableFeature($feature);
28 }
29
30 public static function GetDefaultFeature($moduleId, $notifyEvent, $feature)
31 {
32 return (new Notification($moduleId, $notifyEvent))->getDefaultFeature($feature);
33 }
34
35 public static function GetLifetime($moduleId, $notifyEvent)
36 {
37 return (new Notification($moduleId, $notifyEvent))->getLifetime();
38 }
39
40 public static function OnGetNotifySchema()
41 {
42 $config = [
43 "im" => [
44 "NAME" => GetMessage('IM_NS_IM'),
45 "NOTIFY" => [
46 "message" => [
47 "NAME" => GetMessage('IM_NS_MESSAGE_NEW_MSGVER_2'),
48 "PUSH" => 'Y',
50 ],
51 "chat" => [
52 "NAME" => GetMessage('IM_NS_CHAT_NEW'),
53 "MAIL" => 'N',
54 "PUSH" => 'Y',
56 ],
57 "openChat" => [
58 "NAME" => GetMessage('IM_NS_OPEN_NEW_MSGVER_1'),
59 "MAIL" => 'N',
60 "PUSH" => 'Y',
62 ],
63 "mention" => [
64 "NAME" => GetMessage('IM_NS_MENTION_2'),
65 "PUSH" => 'Y',
66 ],
67 "default" => [
68 "NAME" => GetMessage('IM_NS_DEFAULT_MSGVER_1'),
69 "PUSH" => 'N',
70 "MAIL" => 'N',
71 ],
72 ],
73 ],
74 ];
75
76 if (!IsModuleInstalled("b24network"))
77 {
78 $config["main"] = [
79 "NAME" => GetMessage('IM_NS_MAIN'),
80 "NOTIFY" => [
81 "rating_vote" => [
82 "NAME" => GetMessage('IM_NS_MAIN_RATING_VOTE'),
83 "LIFETIME" => 86400*7,
84 ],
85 "rating_vote_mentioned" => [
86 "NAME" => GetMessage('IM_NS_MAIN_RATING_VOTE_MENTIONED'),
87 "LIFETIME" => 86400*7,
88 ],
89 ],
90 ];
91 }
92
93 return $config;
94 }
95}
__construct()
Определения im_notify_schema.php:11
static CheckDisableFeature($moduleId, $notifyEvent, $feature)
Определения im_notify_schema.php:25
static $arNotifySchema
Определения im_notify_schema.php:9
static GetLifetime($moduleId, $notifyEvent)
Определения im_notify_schema.php:35
static GetNotifySchema()
Определения im_notify_schema.php:15
static GetDefaultFeature($moduleId, $notifyEvent, $feature)
Определения im_notify_schema.php:30
static OnGetNotifySchema()
Определения im_notify_schema.php:40
$moduleId
const IM_NOTIFY_FEATURE_SITE
Определения include.php:76
const IM_NOTIFY_FEATURE_MAIL
Определения include.php:78
const IM_NOTIFY_FEATURE_XMPP
Определения include.php:77
IsModuleInstalled($module_id)
Определения tools.php:5301
IncludeModuleLangFile($filepath, $lang=false, $bReturnArray=false)
Определения tools.php:3778
GetMessage($name, $aReplace=null)
Определения tools.php:3397
$config
Определения quickway.php:69