1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
ChatRecentConfig.php
См. документацию.
1<?php
2
4
7
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}
toRestFormat(array $option=[])
Определения ChatRecentConfig.php:27
merge(PopupDataItem $item)
Определения ChatRecentConfig.php:17
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
$option
Определения options.php:1711