1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
Pin.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\Link\Pin\PinCollection;
8use Bitrix\Im\V2\Link\Pin\PinService;
9use Bitrix\Im\V2\Rest\RestAdapter;
10
11class Pin extends BaseController
12{
16 public function tailAction(Chat $chat, array $filter = [], array $order = [], int $limit = 50): ?array
17 {
18 $pinFilter = [
19 'LAST_ID' => $filter['lastId'] ?? null,
20 'CHAT_ID' => $chat->getChatId(),
21 'START_ID' => $chat->getStartId() ?: null,
22 ];
23 $pinOrder = [
24 'ID' => $order['id'] ?? 'DESC'
25 ];
26 $pinLimit = $this->getLimit($limit);
27
28 $pins = PinCollection::find($pinFilter, $pinOrder, $pinLimit);
29
30 return (new RestAdapter($pins))->toRestFormat();
31 }
32
33 public function countAction(Chat $chat): ?array
34 {
35 return [
36 'counter' => (new PinService())->getCount($chat->getChatId(), $chat->getStartId())
37 ];
38 }
39}
tailAction(Chat $chat, array $filter=[], array $order=[], int $limit=50)
Определения Pin.php:16
countAction(Chat $chat)
Определения Pin.php:33
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
$filter
Определения iblock_catalog_list.php:54
$order
Определения payment.php:8