- Модуль: calendar
- Путь к файлу: ~/bitrix/modules/calendar/lib/sync/google/manager.php
- Класс: BitrixCalendarSyncGoogleManager
- Вызов: Manager::deactivateConnection
private function deactivateConnection()
{
if ($this->connection->getId())
{
$this->connection
->setStatus('[401] Unauthorized')
->setLastSyncTime(new CoreBaseDate())
;
/** @var CoreMappersFactory $mapperFactory */
$mapperFactory = ServiceLocator::getInstance()->get('calendar.service.mappers.factory');
$mapperFactory->getConnection()->update($this->connection);
Util::addPullEvent('refresh_sync_status', $this->connection->getOwner()->getId(), [
'syncInfo' => [
'google' => [
'status' => false,
'type' => $this->connection->getAccountType(),
'connected' => true,
'id' => $this->connection->getId(),
'syncOffset' => 0
],
],
'requestUid' => Util::getRequestUid(),
]);
}
}