1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
ChatOnlyProvider.php
См. документацию.
1<?php
2
3namespace Bitrix\Im\V2\Integration\UI\EntitySelector;
4
5use Bitrix\Im\V2\Chat;
6
11{
12 protected const ENTITY_ID = 'im-chat-only';
13
17 protected const ALLOWED_SEARCH_CHAT_TYPES = [
18 Chat::IM_TYPE_CHAT,
19 Chat::IM_TYPE_OPEN,
20 Chat::IM_TYPE_CHANNEL,
21 Chat::IM_TYPE_OPEN_CHANNEL,
22 ];
23
24 public function __construct(array $options = [])
25 {
26 $options[self::INCLUDE_ONLY_OPTION] = [self::FLAG_CHATS];
27 parent::__construct($options);
28 $this->options[self::ONLY_WITH_MANAGE_USERS_ADD_RIGHT_OPTION] = true;
29 $this->options[self::ONLY_WITH_NULL_ENTITY_TYPE_OPTION] = true;
30 }
31
39 protected function getDefaultDialogItems(): array
40 {
41 $chatIds = $this->getCommonChatQueryWithOrder()
42 ->fetchCollection()
43 ?->getIdList()
44 ?? []
45 ;
46
47 return array_map(static fn (int $chatId): string => 'chat' . $chatId, $chatIds);
48 }
49
50 protected function getAllowedChatTypesForQuery(): array
51 {
52 return $this->options[self::SEARCH_CHAT_TYPES_OPTION];
53 }
54}
getCommonChatQueryWithOrder(string $joinType=Join::TYPE_LEFT, int $limit=self::LIMIT)
Определения RecentProvider.php:511
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804