1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
ChatRecentConfig.php
См. документацию.
1
<?php
2
3
namespace
Bitrix\Im\V2\Recent\Config
;
4
5
use
Bitrix\Im\V2\Chat
;
6
use
Bitrix\Im\V2\Rest\PopupDataItem
;
7
8
class
ChatRecentConfig
implements
PopupDataItem
9
{
10
private
Chat
$chat;
11
12
public
function
__construct
(
Chat
$chat)
13
{
14
$this->chat = $chat;
15
}
16
17
public
function
merge
(
PopupDataItem
$item):
PopupDataItem
18
{
19
return
$this;
20
}
21
22
public
static
function
getRestEntityName
(): string
23
{
24
return
'recentConfig'
;
25
}
26
27
public
function
toRestFormat
(
array
$option
= []): ?
array
28
{
29
return
[
30
'chatId'
=> $this->chat->getChatId(),
31
'sections'
=> $this->getSections(),
32
];
33
}
34
35
public
function
toPullFormat
():
array
36
{
37
return
[
38
'chatId'
=> $this->chat->getChatId(),
39
'sections'
=> $this->chat->getRecentSections(),
40
];
41
}
42
43
private
function
getSections():
array
44
{
45
if
($this->chat->getRole() === Chat::ROLE_GUEST)
46
{
47
return
$this->chat->getRecentSectionsForGuest();
48
}
49
50
return
$this->chat->getRecentSections();
51
}
52
}
Bitrix\Im\V2\Recent\Config\ChatRecentConfig
Определения
ChatRecentConfig.php:9
Bitrix\Im\V2\Recent\Config\ChatRecentConfig\getRestEntityName
static getRestEntityName()
Определения
ChatRecentConfig.php:22
Bitrix\Im\V2\Recent\Config\ChatRecentConfig\toRestFormat
toRestFormat(array $option=[])
Определения
ChatRecentConfig.php:27
Bitrix\Im\V2\Recent\Config\ChatRecentConfig\toPullFormat
toPullFormat()
Определения
ChatRecentConfig.php:35
Bitrix\Im\V2\Recent\Config\ChatRecentConfig\__construct
__construct(Chat $chat)
Определения
ChatRecentConfig.php:12
Bitrix\Im\V2\Recent\Config\ChatRecentConfig\merge
merge(PopupDataItem $item)
Определения
ChatRecentConfig.php:17
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\Rest\PopupDataItem
Определения
PopupDataItem.php:6
Bitrix\Im\V2\Chat
Bitrix\Im\V2\Recent\Config
Определения
ChatRecentConfig.php:3
$option
$option
Определения
options.php:1711
bitrix
modules
im
lib
V2
Recent
Config
ChatRecentConfig.php
Создано системой
1.14.0