13 public static function getData(
int $sourceId): ?array
16 \
Bitrix\Main\Loader::includeModule(
'blog') &&
17 \
Bitrix\Main\Loader::includeModule(
'socialnetwork')
20 $comment = \CBlogComment::getByID($sourceId);
21 if (!$comment || $comment[
'PUBLISH_STATUS'] != BLOG_PUBLISH_STATUS_PUBLISH)
25 $post = \CBlogPost::getByID($comment[
'POST_ID']);
26 if (BlogPost::canRead([
'POST' => $post]))
31 'content' => $post[
'TITLE']
33 if (\
Bitrix\Main\Loader::includeModule(
'disk'))
38 \
Bitrix\
Disk\Uf\BlogPostCommentConnector::class,
43 $blocks = array_merge(
48 'TITLE' => \truncateText($post[
'TITLE'], self::TITLE_LENGTH),