Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
googleapisection.php
1<?php
2
3
5
9
14{
18 private $connection;
19
24 public static function createInstance(): GoogleApiSection
25 {
26 return new self();
27 }
28
29 public function __construct()
30 {
31 }
32
36 public function createSection(array $section): ?array
37 {
38 $googleApiSync = new GoogleApiSync($section['OWNER_ID']);
39 return $googleApiSync->createCalendar($section);
40 }
41
42 public function deleteSection(array $section): void
43 {
44 (new GoogleApiSync((int )$section['OWNER_ID']))->deleteCalendar((string)$section['GAPI_CALENDAR_ID']);
45 }
46
47 public function updateSection(string $gApiCalendarId, array $section): void
48 {
49 $googleApiSync = new GoogleApiSync($section['OWNER_ID']);
50 $googleApiSync->updateCalendar($gApiCalendarId, $section);
51 }
52
59 public function updateSectionList(string $gApiCalendarId, array $section): array
60 {
61 $googleApiSync = new GoogleApiSync($section['OWNER_ID']);
62 return $googleApiSync->updateCalendarList($gApiCalendarId, $section);
63 }
64}
updateSectionList(string $gApiCalendarId, array $section)
updateSection(string $gApiCalendarId, array $section)