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

	$calendarEventId = $event->getParameter('eventId');

	if (intval($calendarEventId) <= 0)
	{
		return $result;
	}

	if ($liveFeedEntity = Provider::init(array(
		'ENTITY_TYPE' => Provider::DATA_ENTITY_TYPE_CALENDAR_EVENT,
		'ENTITY_ID' => $calendarEventId
	)))
	{
		$liveFeedEntity->setContentView();
	}

	$result = new EventResult(
		EventResult::SUCCESS,
		array(),
		'socialnetwork'
	);

	return $result;
}