1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
ComponentParams.php
См. документацию.
1
<?php
2
3
namespace
Bitrix\Im\V2\Message\Param;
4
5
use Bitrix\Im\Text;
6
use Bitrix\Im\V2\Message\Param;
7
use Bitrix\Main\ArgumentException;
8
use Bitrix\Main\Engine\Response\Converter;
9
use Bitrix\Main\Web\Json;
10
11
class
ComponentParams
extends
Param
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
{
38
$this->value =
\Bitrix\Main\Web\Json::decode
(
$value
);
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
}
Bitrix\Im\V2\Message\Param\ComponentParams
Определения
ComponentParams.php:12
Bitrix\Im\V2\Message\Param\ComponentParams\toPullFormat
toPullFormat()
Определения
ComponentParams.php:56
Bitrix\Im\V2\Message\Param\ComponentParams\setValue
setValue($value)
Определения
ComponentParams.php:15
Bitrix\Im\V2\Message\Param\ComponentParams\saveJsonFilter
saveJsonFilter($value)
Определения
ComponentParams.php:27
Bitrix\Im\V2\Message\Param\ComponentParams\loadJsonFilter
loadJsonFilter($value)
Определения
ComponentParams.php:32
Bitrix\Im\V2\Message\Param\ComponentParams\$type
string $type
Определения
ComponentParams.php:13
Bitrix\Im\V2\Message\Param\ComponentParams\saveValueFilter
saveValueFilter($value)
Определения
ComponentParams.php:22
Bitrix\Im\V2\Message\Param\ComponentParams\toRestFormat
toRestFormat()
Определения
ComponentParams.php:51
Bitrix\Im\V2\Message\Param\$value
$value
Определения
Param.php:46
Bitrix\Im\V2\Message\Param\$jsonValue
string $jsonValue
Определения
Param.php:49
Bitrix\Im\V2\Message\Param\getValue
getValue()
Определения
Param.php:185
Bitrix\Main\ArgumentException
Определения
ArgumentException.php:9
Bitrix\Main\Web\Json\decode
static decode($data)
Определения
json.php:50
array
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения
file_new.php:804
Bitrix\Im\V2\Chat\Param
Bitrix\Im\V2\Chat\Param\TYPE_JSON
const TYPE_JSON
Определения
Param.php:20
bitrix
modules
im
lib
V2
Message
Param
ComponentParams.php
Создано системой
1.14.0