• Модуль: socialnetwork
  • Путь к файлу: ~/bitrix/modules/socialnetwork/lib/livefeed/provider.php
  • Класс: BitrixSocialnetworkLivefeedProvider
  • Вызов: Provider::getLogCommentId
public function getLogCommentId()
{
	$result = false;

	$eventId = $this->getEventId();
	if (
		empty($eventId)
		|| $this->getType() !== self::TYPE_COMMENT
	)
	{
		return $result;
	}

	$filter = [
		'EVENT_ID' => $eventId
	];

	if (static::getId() === LogComment::PROVIDER_ID)
	{
		$filter['ID'] = $this->entityId;
	}
	else
	{
		$filter['SOURCE_ID'] = $this->entityId;
	}

	$res = CSocNetLogComments::getList(
		[],
		$filter,
		false,
		[ 'nTopCount' => 1 ],
		[ 'ID', 'LOG_ID' ]
	);

	if ($logCommentEntry = $res->fetch())
	{
		$result = (int)$logCommentEntry['ID'];
		if ((int)$logCommentEntry['LOG_ID'] > 0)
		{
			$this->logId = (int)$logCommentEntry['LOG_ID'];
		}
	}

	return $result;
}