• Модуль: socialnetwork
  • Путь к файлу: ~/bitrix/modules/socialnetwork/lib/integration/mobile/logentry.php
  • Класс: BitrixSocialnetworkIntegrationMobileLogEntry
  • Вызов: LogEntry::onSetContentView
static function onSetContentView(Event $event)
{
	$result = new EventResult(
		EventResult::UNDEFINED,
		array(),
		'socialnetwork'
	);

	$logEventFields = $event->getParameter('logEventFields');

	if (!is_array($logEventFields))
	{
		return $result;
	}

	if ($contentId = Provider::getContentId($logEventFields))
	{
		if ($liveFeedEntity = Provider::init(array(
			'ENTITY_TYPE' => $contentId['ENTITY_TYPE'],
			'ENTITY_ID' => $contentId['ENTITY_ID'],
			'LOG_ID' => $logEventFields["ID"]
		)))
		{
			if ($liveFeedEntity->setContentView())
			{
				$result = new EventResult(
					EventResult::SUCCESS,
					array(),
					'socialnetwork'
				);
			}
		}
	}

	return $result;
}