1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
Collab.php
См. документацию.
1<?php
2
3namespace Bitrix\Im\V2\Controller\Recent;
4
5use Bitrix\Im\V2\Controller\BaseController;
6use Bitrix\Im\V2\Recent\RecentCollab;
7use Bitrix\Im\V2\Recent\RecentError;
8use Bitrix\Main\Type\DateTime;
9
11{
12
16 public function tailAction(int $limit = 50, array $filter = []): ?array
17 {
18 if (isset($filter['lastMessageDate']))
19 {
20 if (!DateTime::isCorrect($filter['lastMessageDate'], \DateTimeInterface::RFC3339))
21 {
22 $this->addError(new RecentError(RecentError::WRONG_DATETIME_FORMAT));
23
24 return null;
25 }
26
27 $filter['lastMessageDate'] = new DateTime($filter['lastMessageDate'], \DateTimeInterface::RFC3339);
28 }
29
30 $limit = $this->getLimit($limit);
31 $recent = RecentCollab::getCollabs($limit, $filter['lastMessageDate'] ?? null);
32
33 return $this->toRestFormatWithPaginationData([$recent], $limit, $recent->count());
34 }
35}
toRestFormatWithPaginationData(array $entities, int $needCount, int $realCount)
Определения BaseController.php:132
tailAction(int $limit=50, array $filter=[])
Определения Collab.php:16
static getCollabs(int $limit, ?DateTime $lastMessageDate=null)
Определения RecentCollab.php:13
</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