14 public static function getData(
int $sourceId): ?array
17 \
Bitrix\Main\Loader::includeModule(
'socialnetwork') &&
18 \
Bitrix\Main\Loader::includeModule(
'forum')
21 $provider = SonetLivefeed\Provider::init([
22 'ENTITY_TYPE' =>
'FORUM_POST',
23 'ENTITY_ID' => $sourceId,
24 'CLONE_DISK_OBJECTS' =>
false
26 if (!$provider || !$provider->getSourceTitle())
30 $res = MessageTable::getList([
33 'TOPIC_TITLE' =>
'TOPIC.TITLE'
41 if ($comment = $res->fetch())
43 $title = $provider->getSourceTitle();
44 $title = preg_replace(
'/\[[^\]]+\]/is',
'', $title);
50 if (\
Bitrix\Main\Loader::includeModule(
'disk'))
60 $blocks = array_merge(
65 'TITLE' => \truncateText($title, self::TITLE_LENGTH),