1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
service.php
См. документацию.
1
<?php
8
9
namespace
Bitrix\Sender\Integration\Im;
10
11
use Bitrix\Main\Loader;
12
use Bitrix\ImOpenLines;
13
use Bitrix\ImConnector;
14
19
class
Service
20
{
26
public
static
function
canUse
()
27
{
28
if
(!
Loader::includeModule
(
'im'
) || !
Loader::includeModule
(
'imopenlines'
) || !
Loader::includeModule
(
'imconnector'
))
29
{
30
return
false
;
31
}
32
else
33
{
34
return
true
;
35
}
36
}
37
43
public
static
function
getExcludedChannelCodes
()
44
{
45
if
(!static::canUse())
46
{
47
return
array
();
48
}
49
50
static
$codes =
null
;
51
if
($codes ===
null
)
52
{
53
$codes = ImConnector\Connector::getListConnectorNotNewsletter();
54
}
55
56
return
$codes;
57
}
58
66
public
static
function
send
($to,
$text
)
67
{
68
if
(!static::canUse())
69
{
70
return
false
;
71
}
72
73
$result
= ImOpenLines\Im::addMessagesNewsletter(
array
(
74
$to =>
array
(
'MESSAGE'
=>
$text
,
'SYSTEM'
=>
'Y'
)
75
));
76
77
return
isset(
$result
[$to]) ? (bool)
$result
[$to] :
false
;
78
}
79
}
Bitrix\Main\Loader\includeModule
static includeModule($moduleName)
Определения
loader.php:67
Bitrix\Sender\Integration\Im\Service\canUse
static canUse()
Определения
service.php:26
Bitrix\Sender\Integration\Im\Service\send
static send($to, $text)
Определения
service.php:66
Bitrix\Sender\Integration\Im\Service\getExcludedChannelCodes
static getExcludedChannelCodes()
Определения
service.php:43
array
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения
file_new.php:804
$result
$result
Определения
get_property_values.php:14
Bitrix\Main\Service
$text
$text
Определения
template_pdf.php:79
bitrix
modules
sender
lib
integration
im
service.php
Создано системой
1.14.0