1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
messageparam.php
См. документацию.
1
<?php declare(strict_types=1);
2
3
namespace
Bitrix\Im\Services;
4
10
class
MessageParam
11
{
13
private
$isEnabled;
14
15
public
function
__construct
()
16
{
17
$this->isEnabled =
\Bitrix\Main\Loader::includeModule
(
'im'
);
18
}
19
28
public
function
getParams
(
int
$messageId
,
bool
$withDefault =
false
): ?
array
29
{
30
if
($this->isEnabled)
31
{
32
return \CIMMessageParam::Get(
$messageId
,
false
, $withDefault) ?:
null
;
33
}
34
35
return
null
;
36
}
37
47
public
function
getParam
(
int
$messageId
,
string
$name
,
bool
$withDefault =
false
)
48
{
49
if
($this->isEnabled)
50
{
51
return \CIMMessageParam::Get(
$messageId
,
$name
, $withDefault) ?:
null
;
52
}
53
54
return
null
;
55
}
56
66
public
function
setParams
(
int
$messageId
,
array
$values,
bool
$sendPull =
true
): bool
67
{
68
if
($this->isEnabled)
69
{
70
if
($sendPull)
71
{
72
return
73
\CIMMessageParam::Set(
$messageId
, $values)
74
&& \CIMMessageParam::SendPull(
$messageId
, array_keys($values))
75
;
76
}
77
else
78
{
79
return \CIMMessageParam::Set(
$messageId
, $values);
80
}
81
}
82
83
return
false
;
84
}
85
96
public
function
setParam
(
int
$messageId
,
string
$name
, $value,
bool
$sendPull =
true
): bool
97
{
98
if
($this->isEnabled)
99
{
100
if
($sendPull)
101
{
102
return
103
\CIMMessageParam::Set(
$messageId
, [
$name
=> $value])
104
&& \CIMMessageParam::SendPull(
$messageId
, [
$name
])
105
;
106
}
107
else
108
{
109
return \CIMMessageParam::Set(
$messageId
, [
$name
=> $value]);
110
}
111
}
112
113
return
false
;
114
}
115
}
$messageId
if(! $messageFields||!isset($messageFields['message_id'])||!isset($messageFields['status'])||!CModule::IncludeModule("messageservice")) $messageId
Определения
callback_ismscenter.php:26
Bitrix\Im\Services\MessageParam
Определения
messageparam.php:11
Bitrix\Im\Services\MessageParam\__construct
__construct()
Определения
messageparam.php:15
Bitrix\Im\Services\MessageParam\getParam
getParam(int $messageId, string $name, bool $withDefault=false)
Определения
messageparam.php:47
Bitrix\Im\Services\MessageParam\setParams
setParams(int $messageId, array $values, bool $sendPull=true)
Определения
messageparam.php:66
Bitrix\Im\Services\MessageParam\getParams
getParams(int $messageId, bool $withDefault=false)
Определения
messageparam.php:28
Bitrix\Im\Services\MessageParam\setParam
setParam(int $messageId, string $name, $value, bool $sendPull=true)
Определения
messageparam.php:96
Bitrix\Main\Loader\includeModule
static includeModule($moduleName)
Определения
loader.php:67
array
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения
file_new.php:804
$name
$name
Определения
menu_edit.php:35
bitrix
modules
im
lib
services
messageparam.php
Создано системой
1.14.0