3namespace Bitrix\Im\V2\Message\Reaction;
5use Bitrix\Im\Model\ReactionTable;
6use Bitrix\Im\V2\Collection;
7use Bitrix\Im\V2\Common\ContextCustomer;
8use Bitrix\Im\V2\Entity\User\UserPopupItem;
9use Bitrix\Im\V2\Rest\PopupData;
10use Bitrix\Im\V2\Rest\PopupDataAggregatable;
11use Bitrix\Im\V2\Rest\RestConvertible;
12use Bitrix\Im\V2\Service\Context;
13use Bitrix\Main\ORM\Query\Query;
25 return ReactionItem::class;
30 $reactionOrder = [
'ID' =>
'DESC'];
34 $reactionOrder[
'ID'] =
$order[
'ID'];
37 $query = ReactionTable::query()
38 ->setSelect([
'ID',
'CHAT_ID',
'MESSAGE_ID',
'USER_ID',
'DATE_CREATE',
'REACTION'])
41 if ($reactionOrder[
'ID'] !==
'DESC')
43 $query->setOrder($reactionOrder);
53 return new static(
$query->fetchCollection());
70 foreach ($this as $reaction)
72 $rest[] = $reaction->toRestFormat(
$option);
82 $operator =
$order[
'ID'] ===
'DESC' ?
'<' :
'>';
91 if (isset(
$filter[
'MESSAGE_ID']))
100 private function getUserIds():
array
104 foreach ($this as $reaction)
106 $userIds[$reaction->getUserId()] = $reaction->getUserId();
static getRestEntityName()
static find(array $filter, array $order, ?int $limit=null, ?Context $context=null)
toRestFormat(array $option=[])
static getCollectionElementClass()
static processFilters(Query $query, array $filter, array $order)
getPopupData(array $excludedList=[])
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)