1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
ChatUserAdd.php
См. документацию.
1<?php
2
3declare(strict_types = 1);
4
5namespace Bitrix\Im\V2\Pull\Event;
6
7use Bitrix\Im\Text;
8use Bitrix\Im\V2\Entity\User\UserCollection;
9use Bitrix\Im\V2\Pull\EventType;
10use Bitrix\Im\V2\Chat;
11
13{
14 protected array $usersToAdd;
15
17 {
18 $this->usersToAdd = $usersToAdd;
19
20 parent::__construct($chat);
21 }
22
23 protected function getBasePullParamsInternal(): array
24 {
25 return [
26 'chatId' => $this->chat->getChatId(),
27 'dialogId' => $this->getBaseDialogId(),
28 'chatTitle' => Text::decodeEmoji($this->chat->getTitle() ?? ''),
29 'chatOwner' => $this->chat->getAuthorId(),
30 'chatExtranet' => $this->chat->getExtranet() ?? false,
31 'containsCollaber' => $this->chat->containsCollaber(),
32 'users' => (new UserCollection($this->usersToAdd))->toRestFormat(['IDS_AS_KEY' => true]),
33 'newUsers' => array_values($this->usersToAdd),
34 'relations' => $this->chat->getRelationsByUserIds($this->usersToAdd)->toRestFormat(),
35 'userCount' => $this->chat->getUserCount(),
36 ];
37 }
38
39 protected function getType(): EventType
40 {
41 return EventType::ChatUserAdd;
42 }
43}
static decodeEmoji($text)
Определения text.php:378
__construct(Chat $chat, array $usersToAdd)
Определения ChatUserAdd.php:16
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
EventType
Определения EventType.php:6