1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
ComponentParams.php
См. документацию.
1<?php
2
3namespace Bitrix\Im\V2\Message\Param;
4
5use Bitrix\Im\Text;
6use Bitrix\Im\V2\Message\Param;
7use Bitrix\Main\ArgumentException;
8use Bitrix\Main\Engine\Response\Converter;
9use Bitrix\Main\Web\Json;
10
12{
13 protected ?string $type = Param::TYPE_JSON;
14
15 public function setValue($value): self
16 {
17 $this->value = $value;
18 $this->jsonValue = Json::encode($value);
19
20 return $this;
21 }
22 public function saveValueFilter($value)
23 {
24 return '';
25 }
26
27 public function saveJsonFilter($value)
28 {
29 return $this->jsonValue;
30 }
31
32 public function loadJsonFilter($value)
33 {
34 if (!empty($value))
35 {
36 try
37 {
39 }
40 catch (ArgumentException $ext)
41 {}
42 }
43 else
44 {
45 $value = null;
46 }
47
48 return $value;
49 }
50
51 public function toRestFormat(): ?array
52 {
53 return Converter::toJson()->process($this->getValue());
54 }
55
56 public function toPullFormat(): ?array
57 {
58 return Converter::toJson()->process($this->getValue());
59 }
60}
string $jsonValue
Определения Param.php:49
getValue()
Определения Param.php:185
static decode($data)
Определения json.php:50
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
const TYPE_JSON
Определения Param.php:20