1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
MemberEntities.php
См. документацию.
1<?php
2
3namespace Bitrix\Im\V2\Controller\Chat;
4
5use Bitrix\Im\V2\Chat;
6use Bitrix\Im\V2\Controller\BaseController;
7use Bitrix\Im\V2\Controller\Filter\CheckActionAccess;
8use Bitrix\Im\V2\Integration\HumanResources\Structure;
9use Bitrix\Im\V2\Relation\Reason;
10use Bitrix\Main\Engine\CurrentUser;
11use Bitrix\Main\UI\EntitySelector\Converter;
12
14{
15 protected const LIMIT = 1000;
16
20 public function listAction(Chat $chat): ?array
21 {
22 $relations = $chat->getRelationByReason(Reason::DEFAULT);
23 $userCount = $relations->count();
24
25 $users = [];
26 if ($userCount < self::LIMIT)
27 {
28 foreach ($relations->getUserIds() as $userId)
29 {
31 if (!$user->isBot())
32 {
33 $users[] = ['user', $userId];
34 }
35 }
36 }
37
38 $departments = Converter::convertFromFinderCodes((new Structure($chat))->getNodesAccessCodes());
39 foreach ($departments as $key => $department)
40 {
41 if (is_numeric($department[1]))
42 {
43 $departments[$key][1] = (int)$department[1];
44 }
45 }
46
47 return [
48 'memberEntities' => array_merge($users, $departments),
49 'userCount' => $userCount,
50 'areUsersCollapsed' => $userCount >= self::LIMIT,
51 ];
52 }
53}
if(!is_object($USER)||! $USER->IsAuthorized()) $userId
Определения check_mail.php:18
static getInstance(?int $id)
Определения User.php:72
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
$user
Определения mysql_to_pgsql.php:33
if(empty($signedUserToken)) $key
Определения quickway.php:257