Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
messagewebhook.php
1
<?php
9
namespace
Bitrix\Sender\Integration\Sender\WebHook
;
10
11
use
Bitrix\Main\Localization\Loc
;
12
use
Bitrix\Main\Result
;
13
use
Bitrix\Sender\Message
;
14
use
Bitrix\Sender\Entity
;
15
16
Loc::loadMessages
(__FILE__);
17
22
class
MessageWebHook
implements
Message\iBase
23
{
24
const
CODE
=
self::CODE_WEB_HOOK
;
25
31
public
function
getName
()
32
{
33
return
Loc::getMessage
(
'SENDER_INTEGRATION_WEBHOOK_MESSAGE_NAME'
);
34
}
35
41
public
function
getCode
()
42
{
43
return
static::CODE;
44
}
45
51
public
function
getSupportedTransports
()
52
{
53
return
array(
TransportWebHook::CODE
);
54
}
55
63
public
function
loadConfiguration
($id =
null
)
64
{
65
$configuration =
new
Message\Configuration
();
66
$configuration->setArrayOptions(array(
67
array(
68
'type'
=>
'string'
,
69
'code'
=>
'URI'
,
70
'name'
=>
Loc::getMessage
(
'SENDER_INTEGRATION_WEBHOOK_MESSAGE_CONFIG_URI'
),
71
'required'
=>
true
,
72
),
73
));
74
75
return
Entity\Message::create()
76
->setCode($this->
getCode
())
77
->loadConfiguration($id, $configuration);
78
}
79
87
public
function
saveConfiguration
(
Message
\
Configuration
$configuration)
88
{
89
return
Entity\Message::create()
90
->setCode($this->
getCode
())
91
->saveConfiguration($configuration);
92
}
93
100
public
function
copyConfiguration
($id)
101
{
102
return
Entity\Message::create()
103
->setCode($this->
getCode
())
104
->copyConfiguration($id);
105
}
106
}
Bitrix\Main\Config\Configuration
Definition
configuration.php:7
Bitrix\Main\Localization\Loc
Definition
loc.php:11
Bitrix\Main\Localization\Loc\loadMessages
static loadMessages($file)
Definition
loc.php:64
Bitrix\Main\Localization\Loc\getMessage
static getMessage($code, $replace=null, $language=null)
Definition
loc.php:29
Bitrix\Main\ORM\Data\Result
Definition
result.php:16
Bitrix\Sender\Entity\Message
Definition
message.php:27
Bitrix\Sender\Integration\Sender\WebHook\MessageWebHook
Definition
messagewebhook.php:23
Bitrix\Sender\Integration\Sender\WebHook\MessageWebHook\CODE
const CODE
Definition
messagewebhook.php:24
Bitrix\Sender\Integration\Sender\WebHook\MessageWebHook\getName
getName()
Definition
messagewebhook.php:31
Bitrix\Sender\Integration\Sender\WebHook\MessageWebHook\loadConfiguration
loadConfiguration($id=null)
Definition
messagewebhook.php:63
Bitrix\Sender\Integration\Sender\WebHook\MessageWebHook\getCode
getCode()
Definition
messagewebhook.php:41
Bitrix\Sender\Integration\Sender\WebHook\MessageWebHook\copyConfiguration
copyConfiguration($id)
Definition
messagewebhook.php:100
Bitrix\Sender\Integration\Sender\WebHook\MessageWebHook\saveConfiguration
saveConfiguration(Message\Configuration $configuration)
Definition
messagewebhook.php:87
Bitrix\Sender\Integration\Sender\WebHook\MessageWebHook\getSupportedTransports
getSupportedTransports()
Definition
messagewebhook.php:51
Bitrix\Sender\Integration\Sender\WebHook\TransportWebHook\CODE
const CODE
Definition
transportwebhook.php:27
Bitrix\Sender\Message\iBase
Definition
ibase.php:16
Bitrix\Sender\Message\iBase\CODE_WEB_HOOK
const CODE_WEB_HOOK
Definition
ibase.php:19
Bitrix\Sender\Entity
Definition
ad.php:8
Bitrix\Sender\Integration\Sender\WebHook
Definition
messagewebhook.php:9
Bitrix\Sender\Message
Definition
adapter.php:9
modules
sender
lib
integration
sender
webhook
messagewebhook.php
Создано системой
1.10.0