PluginProbe
Timetics – Appointment Booking Calendar & Scheduling / 1.0.60
Timetics – Appointment Booking Calendar & Scheduling v1.0.60
1.0.61 1.0.60 1.0.59 1.0.58 1.0.57 1.0.56 trunk 1.0.0 1.0.1 1.0.10 1.0.11 1.0.12 1.0.13 1.0.14 1.0.15 1.0.16 1.0.17 1.0.18 1.0.19 1.0.2 1.0.20 1.0.21 1.0.22 1.0.23 1.0.24 All 62 releases
timetics / core / staffs / calendars / GoogleCalendarSync.php

GoogleCalendarSync.php in Timetics – Appointment Booking Calendar & Scheduling 1.0.60, at core/staffs/calendars/GoogleCalendarSync.php

48 lines 1.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Google Calendar Sync Class
4 *
5 * @package timetics
6 */
7 namespace Timetics\Core\Staffs\Calendars;
8
9 use Timetics\Core\Integrations\Google\Service\Calendar;
10
11 /**
12 * Google calendar sync
13 */
14 class GoogleCalendarSync implements CalendarSyncInterface {
15
16 /**
17 * Sync booking to calendar
18 *
19 * @param array $bookingData [$bookingData description]
20 *
21 * @return bool [return description]
22 */
23 public function syncToCalendar( array $bookingData ): bool {
24 // Implement Google Calendar API call
25 return true;
26 }
27
28 /**
29 * Sync with google calendar
30 *
31 * @param string $teamMemberId Team member id
32 *
33 * @return array Calendar Event List
34 */
35 public function fetchBookings( string $teamMemberId ): array {
36 // Fetch bookings from Google Calendar API
37
38 $calendar = new Calendar();
39 $events = $calendar->get_events( $teamMemberId );
40
41 if ( ! $events ) {
42 return [];
43 }
44
45 return $events;
46 }
47 }
48