- Модуль: calendar
- Путь к файлу: ~/bitrix/modules/calendar/classes/general/calendar.php
- Класс: CCalendar
- Вызов: CCalendar::deleteGoogleConnectionSections
static function deleteGoogleConnectionSections(array $sections)
{
foreach ($sections as $section)
{
self::stopGoogleSectionChannels($section);
if (in_array(
$section['EXTERNAL_TYPE'],
GoogleDictionary::ACCESS_ROLE_TO_EXTERNAL_TYPE,
true
))
{
CCalendarSect::Delete($section['ID'], false);
}
else
{
CCalendarSect::CleanFieldsValueById((int)$section['ID'], [
'CAL_DAV_CON',
'SYNC_TOKEN',
'PAGE_TOKEN',
]);
CCalendarEvent::cleanFieldsValueBySectionId((int)$section['ID'], [
'SYNC_STATUS',
]);
}
}
}