13 public static function find(
15 array $order = [
'ID' =>
'ASC'],
20 $viewOrder = [
'ID' =>
'ASC'];
22 if (isset($order[
'ID']))
24 $viewOrder[
'ID'] = $order[
'ID'];
28 if ($viewOrder[
'ID'] ===
'DESC')
30 $query->setOrder($viewOrder);
34 $query->setLimit($limit);
36 static::processFilters($query, $filter, $viewOrder);
38 return (
new static())->initByEntityCollection($query->fetchCollection());
50 $this[] =
new ViewItem($item->getId(), $item->getMessageId(), $item->getUserId(), $item->getDateCreate());