- Модуль: intranet
- Путь к файлу: ~/bitrix/modules/intranet/lib/component/userprofile/profilepost.php
- Класс: BitrixIntranetComponentUserProfileProfilePost
- Вызов: ProfilePost::getPostData
public function getPostData($postId = 0)
{
$result = [];
$postId = intval($postId);
if (
$postId > 0
&& Loader::includeModule('blog')
)
{
$res = BitrixBlogPostTable::getList([
'filter' => [
'=ID' => $postId
],
'select' => [ 'ID', 'TITLE', 'MICRO', 'DETAIL_TEXT' ]
]);
if ($postFields = $res->fetch())
{
$result = [
'ID' => $postFields['ID'],
'TITLE' => ($postFields['MICRO'] == 'Y' ? '' : $postFields['TITLE']),
'DETAIL_TEXT' => $postFields['DETAIL_TEXT']
];
$result['UF'] = $this->getProfileBlogPostUF([
'postId' => $postFields['ID']
]);
$result['UF_RENDERED'] = $this->getProfileBlogPostUFRendered([
'postId' => $postFields['ID'],
'ufList' => $result['UF'],
'detailText' => $postFields['DETAIL_TEXT']
]);
}
}
return $result;
}