• Модуль: calendar
  • Путь к файлу: ~/bitrix/modules/calendar/lib/sharing/helper.php
  • Класс: BitrixCalendarSharingHelper
  • Вызов: Helper::hasSharingEvent
static function hasSharingEvent(): bool
{
	$result = false;
	$userId = CCalendar::GetUserId();

	if ($userId)
	{
		$queryResult = EventTable::query()
			->setSelect(['ID'])
			->where('EVENT_TYPE', Dictionary::EVENT_TYPE['shared'])
			->where('OWNER_ID', $userId)
			->setLimit(1)
		;

		if ($queryResult->fetch())
		{
			$result = true;
		}
	}

	return $result;
}