• Модуль: calendar
  • Путь к файлу: ~/bitrix/modules/calendar/lib/sync/googleapisync.php
  • Класс: BitrixCalendarSyncGoogleApiSync
  • Вызов: GoogleApiSync::getChannelOwner
static function getChannelOwner(string $channelId = null): ?int
{
	if (empty($channelId))
	{
		return null;
	}

	$matches = [];
	preg_match('/(' . self::CONNECTION_CHANNEL_TYPE . '|' . self::SECTION_CHANNEL_TYPE . ')_(d+)_.+/', $channelId, $matches);

	return !empty($matches) && (int)$matches[2] > 0
		? (int)$matches[2]
		: null
	;
}