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