1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
ChatFields.php
См. документацию.
1
<?php
2
3
namespace
Bitrix\Im\V2\Chat\Fields;
4
5
class
ChatFields
6
{
7
private
static
array
$instance = [];
8
9
public
function
__construct
(
protected
int
$chatId)
10
{}
11
12
public
static
function
getInstance
(
int
$chatId): self
13
{
14
if
(self::$instance[$chatId] ===
null
)
15
{
16
self::$instance[$chatId] =
new
self
($chatId);
17
}
18
19
return
self::$instance[$chatId];
20
}
21
22
public
function
getField
(
Field
$field):
BaseField
23
{
24
return
FieldFactory::getInstance
()->getField($field, $this->chatId);
25
}
26
27
public
function
getOptionalParamsToRest
(
array
$option
= []):
array
28
{
29
return
$this->
getParamsInternal
(
Field::getOptionalParams
(),
$option
);
30
}
31
32
protected
function
getParamsInternal
(
array
$fields
,
$option
):
array
33
{
34
$result
= [];
35
foreach
(
$fields
as $field)
36
{
37
$result
[] = $this->
getField
($field)->toRestFormat(
$option
);
38
}
39
40
return
array_merge(...
$result
);
41
}
42
}
Bitrix\Im\V2\Chat\Fields\BaseField
Определения
BaseField.php:9
Bitrix\Im\V2\Chat\Fields\ChatFields
Определения
ChatFields.php:6
Bitrix\Im\V2\Chat\Fields\ChatFields\getParamsInternal
getParamsInternal(array $fields, $option)
Определения
ChatFields.php:32
Bitrix\Im\V2\Chat\Fields\ChatFields\getOptionalParamsToRest
getOptionalParamsToRest(array $option=[])
Определения
ChatFields.php:27
Bitrix\Im\V2\Chat\Fields\ChatFields\getField
getField(Field $field)
Определения
ChatFields.php:22
Bitrix\Im\V2\Chat\Fields\ChatFields\__construct
__construct(protected int $chatId)
Определения
ChatFields.php:9
Bitrix\Im\V2\Chat\Fields\ChatFields\getInstance
static getInstance(int $chatId)
Определения
ChatFields.php:12
Bitrix\Im\V2\Chat\Fields\FieldFactory\getInstance
static getInstance()
Определения
FieldFactory.php:15
array
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения
file_new.php:804
$result
$result
Определения
get_property_values.php:14
Bitrix\Im\V2\Chat\Fields\Field
Определения
Background.php:3
Bitrix\Im\V2\Chat\Fields\getOptionalParams
@ getOptionalParams
Определения
Field.php:10
$option
$option
Определения
options.php:1711
$fields
$fields
Определения
yandex_run.php:501
bitrix
modules
im
lib
V2
Chat
Fields
ChatFields.php
Создано системой
1.14.0