28 public static function find(array $filter, array $order, ?
int $limit =
null, ?
Context $context =
null): self
30 $reactionOrder = [
'ID' =>
'DESC'];
32 if (isset($order[
'ID']))
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);
48 $query->setLimit($limit);
51 static::processFilters($query, $filter, $reactionOrder);
53 return new static($query->fetchCollection());