• Модуль: socialnetwork
  • Путь к файлу: ~/bitrix/modules/socialnetwork/lib/livefeed/logevent.php
  • Класс: BitrixSocialnetworkLivefeedLogEvent
  • Вызов: LogEvent::getPinnedDescription
public function getPinnedDescription()
{
	$result = '';

	if (empty($this->sourceFields))
	{
		$this->initSourceFields();
	}

	$logEntryFields = $this->getSourceFields();
	if (empty($logEntryFields))
	{
		return $result;
	}

	$html = false;

	if (
		!empty($logEntryFields['SCHEME_FIELDS'])
		&& isset($logEntryFields['SCHEME_FIELDS']['IS_HTML'])
	)
	{
		$html = ($logEntryFields['SCHEME_FIELDS']['IS_HTML'] === "Y");
	}

	if ($html)
	{
		$result = htmlspecialcharsback($logEntryFields['MESSAGE']);
		$result = truncateText(CTextParser::clearAllTags($result), 100);
	}
	else
	{
		$result = truncateText(htmlspecialcharsEx($logEntryFields['MESSAGE']), 100);
	}

	return $result;
}