1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
messageim.php
См. документацию.
1<?php
8
10
16
17Loc::loadMessages(__FILE__);
18
24{
25 const CODE = self::CODE_IM;
26
28 protected $configuration;
29
33 public function __construct()
34 {
35 $this->configuration = new Message\Configuration();
36 }
37
42 public function getName()
43 {
44 return Loc::getMessage('SENDER_INTEGRATION_IM_MESSAGE_NAME');
45 }
46
47 public function getCode()
48 {
49 return static::CODE;
50 }
51
52 public function getSupportedTransports()
53 {
55 }
56
57 protected function setConfigurationOptions()
58 {
59 $this->configuration->setArrayOptions(array(
60 array(
61 'type' => 'text',
62 'code' => 'MESSAGE_TEXT',
63 'name' => Loc::getMessage('SENDER_INTEGRATION_IM_MESSAGE_CONFIG_MESSAGE_TEXT'),
64 'required' => true,
65 ),
66 ));
67
68 TimeLimiter::prepareMessageConfiguration($this->configuration);
69 }
70
78 public function loadConfiguration($id = null)
79 {
80 if (!$this->configuration->hasOptions())
81 {
83 }
84
86 $this->configuration->setView(
87 function () use ($configuration)
88 {
89 ob_start();
90 $GLOBALS['APPLICATION']->IncludeComponent(
91 'bitrix:sender.im.message',
92 '',
93 array(
94 'INPUT_NAME' => '%INPUT_NAME_MESSAGE_TEXT%',
95 'VALUE' => $configuration->get('MESSAGE_TEXT'),
96 )
97 );
98
99 return ob_get_clean();
100 }
101 );
102
103 Entity\Message::create()
104 ->setCode($this->getCode())
105 ->loadConfiguration($id, $this->configuration);
106
107 TimeLimiter::prepareMessageConfigurationView($this->configuration);
108
110 }
111
120 {
121 return Entity\Message::create()
122 ->setCode($this->getCode())
123 ->saveConfiguration($this->configuration);
124 }
125
132 public function removeConfiguration($id)
133 {
135 return $result->isSuccess();
136 }
137
144 public function copyConfiguration($id)
145 {
146 return Entity\Message::create()
147 ->setCode($this->getCode())
148 ->copyConfiguration($id);
149 }
150}
static removeById($id)
Определения message.php:146
loadConfiguration($id=null)
Определения messageim.php:78
saveConfiguration(Message\Configuration $configuration)
Определения messageim.php:119
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
$result
Определения get_property_values.php:14
$GLOBALS['____1690880296']
Определения license.php:1
Определения ad.php:8
Определения adapter.php:9