• Модуль: im
  • Путь к файлу: ~/bitrix/modules/im/lib/V2/Link/Reminder/ReminderCollection.php
  • Класс: BitrixImV2LinkReminderReminderCollection
  • Вызов: ReminderCollection::getByMessage
static function getByMessage(Message $message): self
{
	$entities = LinkReminderTable::query()
		->setSelect(['ID', 'CHAT_ID', 'AUTHOR_ID', 'DATE_CREATE', 'MESSAGE_ID', 'DATE_REMIND', 'IS_REMINDED'])
		->where('MESSAGE_ID', $message->getMessageId())
		->fetchCollection()
	;

	if ($entities === null)
	{
		return new static();
	}

	$links = static::initByEntityCollection($entities);

	foreach ($links as $link)
	{
		$link->setEntity($message);
	}

	return $links;
}