- Модуль: im
- Путь к файлу: ~/bitrix/modules/im/lib/V2/Link/Reminder/ReminderCollection.php
- Класс: BitrixImV2LinkReminderReminderCollection
- Вызов: ReminderCollection::find
static function find(
array $filter,
array $order,
?int $limit = null,
?Context $context = null
): self
{
$context = $context ?? Locator::getContext();
$reminderOrder = ['ID' => 'DESC'];
if (isset($order['ID']))
{
$reminderOrder['ID'] = $order['ID'];
}
$query = LinkReminderTable::query()
->setSelect(['ID', 'CHAT_ID', 'AUTHOR_ID', 'DATE_CREATE', 'MESSAGE_ID', 'DATE_REMIND', 'IS_REMINDED', 'MESSAGE'])
->where('AUTHOR_ID', $context->getUserId())
->setOrder($reminderOrder)
;
if (isset($limit))
{
$query->setLimit($limit);
}
static::processFilters($query, $filter, $reminderOrder);
return static::initByEntityCollection($query->fetchCollection());
}