• Модуль: socialnetwork
  • Путь к файлу: ~/bitrix/modules/socialnetwork/lib/helper/servicecomment.php
  • Класс: BitrixSocialnetworkHelperServiceComment
  • Вызов: ServiceComment::getSourceEntityUrl
static function getSourceEntityUrl(array $params = []): string
{
	$sourceEntityType = ($params['sourceEntityType'] ?? false);
	$sourceEntityId = (int)($params['sourceEntityId'] ?? 0);
	$sourceData = ($params['sourceData'] ?? []);
	$userPath = ($params['userPath'] ?? '');

	return (
		$sourceEntityType === CommentAuxCreateEntity::SOURCE_TYPE_BLOG_COMMENT
			? $userPath . 'blog/' . $sourceData['post']['ID']. '/?commentId=' . $sourceEntityId . '#com' . $sourceEntityId
			: ''
	);
}