Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
chat.php
1<?php
2
4
5class Chat
6{
7 public static function getSelectorEntityType(array $chat): string
8 {
9 $entityType = $chat['ENTITY_TYPE'];
10 if ($entityType !== '' && $entityType !== null)
11 {
12 return $entityType;
13 }
14
15 $type = $chat['TYPE'];
16 switch ($type)
17 {
18 case \Bitrix\Im\Chat::TYPE_GROUP:
19 return 'GROUP';
20
21 case \Bitrix\Im\Chat::TYPE_OPEN:
22 return 'CHANNEL';
23 }
24
25 return '';
26 }
27}