1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
ChatOnlyProvider.php
См. документацию.
1
<?php
2
3
namespace
Bitrix\Im\V2\Integration\UI\EntitySelector;
4
5
use Bitrix\Im\V2\Chat;
6
10
class
ChatOnlyProvider
extends
RecentProvider
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
}
Bitrix\Im\V2\Integration\UI\EntitySelector\ChatOnlyProvider
Определения
ChatOnlyProvider.php:11
Bitrix\Im\V2\Integration\UI\EntitySelector\ChatOnlyProvider\__construct
__construct(array $options=[])
Определения
ChatOnlyProvider.php:24
Bitrix\Im\V2\Integration\UI\EntitySelector\ChatOnlyProvider\ENTITY_ID
const ENTITY_ID
Определения
ChatOnlyProvider.php:12
Bitrix\Im\V2\Integration\UI\EntitySelector\ChatOnlyProvider\ALLOWED_SEARCH_CHAT_TYPES
const ALLOWED_SEARCH_CHAT_TYPES
Определения
ChatOnlyProvider.php:17
Bitrix\Im\V2\Integration\UI\EntitySelector\ChatOnlyProvider\getDefaultDialogItems
getDefaultDialogItems()
Определения
ChatOnlyProvider.php:39
Bitrix\Im\V2\Integration\UI\EntitySelector\ChatOnlyProvider\getAllowedChatTypesForQuery
getAllowedChatTypesForQuery()
Определения
ChatOnlyProvider.php:50
Bitrix\Im\V2\Integration\UI\EntitySelector\RecentProvider
Определения
RecentProvider.php:41
Bitrix\Im\V2\Integration\UI\EntitySelector\RecentProvider\getCommonChatQueryWithOrder
getCommonChatQueryWithOrder(string $joinType=Join::TYPE_LEFT, int $limit=self::LIMIT)
Определения
RecentProvider.php:511
Bitrix\UI\EntitySelector\BaseProvider\$options
$options
Определения
baseprovider.php:6
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
modules
im
lib
V2
Integration
UI
EntitySelector
ChatOnlyProvider.php
Создано системой
1.14.0