27 public static function find(
29 array $order = [
'ID' =>
'DESC'],
34 $context = $context ?? Locator::getContext();
36 $pinOrder = [
'ID' =>
'DESC'];
38 if (isset($order[
'ID']))
40 $pinOrder[
'ID'] = $order[
'ID'];
43 $query = LinkPinTable::query()
44 ->setSelect([
'ID',
'CHAT_ID',
'AUTHOR_ID',
'DATE_CREATE',
'MESSAGE_ID'])
49 $query->setLimit($limit);
52 static::processFilters($query, $filter, $pinOrder);
54 return static::initByEntityCollection($query->fetchCollection());