1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
Member.php
См. документацию.
1<?php
2
3declare(strict_types=1);
4
5namespace Bitrix\Im\V2\Controller\Chat;
6
7use Bitrix\Im\V2\Chat;
8use Bitrix\Im\V2\Controller\BaseController;
9use Bitrix\Im\V2\Relation\Provider\RelationCursor;
10use Bitrix\Main\Validation\Engine\AutoWire\ValidationParameter;
11
13{
14 public function getAutoWiredParameters()
15 {
16 return array_merge(
17 [
19 RelationCursor::class,
20 fn ($className, array $cursor) => RelationCursor::createFromArray($cursor),
21 fn () => 'cursor'
22 ),
23 ],
24 parent::getAutoWiredParameters()
25 );
26 }
27
31 public function tailAction(Chat $chat, int $limit = 50, ?RelationCursor $relationCursor = null): ?array
32 {
33 $members = $chat->getRelationProvider()->getMembers($limit, $relationCursor);
34 $nextCursor = RelationCursor::getNext($members, $limit);
35 $rest = $this->toRestFormat($members);
36 $rest['nextCursor'] = $nextCursor?->toRestFormat();
37
38 return $rest;
39 }
40}
toRestFormat(RestConvertible ... $entities)
Определения BaseController.php:108
tailAction(Chat $chat, int $limit=50, ?RelationCursor $relationCursor=null)
Определения Member.php:31
static createFromArray(array $parameters)
Определения RelationCursor.php:35
static getNext(RelationCollection $relations, int $limit)
Определения RelationCursor.php:40
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804