• Модуль: calendar
  • Путь к файлу: ~/bitrix/modules/calendar/lib/sync/googleapipush.php
  • Класс: BitrixCalendarSyncGoogleApiPush
  • Вызов: GoogleApiPush::getLastResultBySectionId
static function getLastResultBySectionId(int $sectionId): ?string
{
	global $DB;

	$strSql = "SELECT c.ID as CONNECTON_ID, c.LAST_RESULT, s.ID as SECTION_ID
				FROM b_dav_connections c 
				INNER JOIN b_calendar_section s 
					ON s.ID = " . $sectionId
		. " WHERE s.CAL_DAV_CON = c.ID";

	$connectionDb = $DB->Query($strSql);
	if ($connection = $connectionDb->Fetch())
	{
		return $connection['LAST_RESULT'];
	}

	return null;
}