Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
User.php
1
<?php
2
3
namespace
Bitrix\Im\V2\Controller\Chat
;
4
5
use
Bitrix\Im\V2\Controller\BaseController
;
6
7
class
User
extends
BaseController
8
{
12
public
function
listAction
(\
Bitrix
\Im\V2\
Chat
$chat, array $order = [],
int
$limit = self::DEFAULT_LIMIT): ?array
13
{
14
$relationOrder = $this->prepareRelationOrder($order);
15
$limit = $this->
getLimit
($limit);
16
17
return
$this->
toRestFormat
($chat->getRelations([
'ORDER'
=> $relationOrder,
'LIMIT'
=> $limit])->getUsers());
18
}
19
20
private
function
prepareRelationOrder(array $order): array
21
{
22
if
(isset($order[
'id'
]))
23
{
24
return
[
'ID'
=> strtoupper($order[
'id'
])];
25
}
26
if
(isset($order[
'lastSendMessageId'
]))
27
{
28
return
[
'LAST_SEND_MESSAGE_ID'
=> strtoupper($order[
'lastSendMessageId'
])];
29
}
30
if
(isset($order[
'userId'
]))
31
{
32
return
[
'USER_ID'
=> strtoupper($order[
'USER_ID'
])];
33
}
34
35
return
[];
36
}
37
}
Bitrix\Im\Chat
Definition
chat.php:19
Bitrix\Im\User
Definition
user.php:10
Bitrix\Im\V2\Controller\BaseController
Definition
BaseController.php:24
Bitrix\Im\V2\Controller\BaseController\toRestFormat
toRestFormat(RestConvertible ... $entities)
Definition
BaseController.php:78
Bitrix\Im\V2\Controller\BaseController\getLimit
getLimit(int $limit)
Definition
BaseController.php:73
Bitrix\Im\V2\Controller\Chat\User\listAction
listAction(\Bitrix\Im\V2\Chat $chat, array $order=[], int $limit=self::DEFAULT_LIMIT)
Definition
User.php:12
Bitrix\Im\V2\Controller\Chat
Definition
Message.php:3
Bitrix
modules
im
lib
V2
Controller
Chat
User.php
Создано системой
1.10.0