Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
messagewebhook.php
1<?php
10
15
16Loc::loadMessages(__FILE__);
17
23{
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}
static loadMessages($file)
Definition loc.php:64
static getMessage($code, $replace=null, $language=null)
Definition loc.php:29
saveConfiguration(Message\Configuration $configuration)