# timetics/1.0.62/core/staffs/calendars/CalendarSyncFactory.php

Timetics – Appointment Booking Calendar &amp; Scheduling, version 1.0.62. 35 lines.

- Page: https://pluginprobe.com/plugins/timetics/1.0.62/code/core/staffs/calendars/CalendarSyncFactory.php
- Raw: https://pluginprobe.com/plugins/timetics/1.0.62/raw/core/staffs/calendars/CalendarSyncFactory.php
- Modified: 2026-08-27T14:56:18+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/timetics/1.0.62/code/core/staffs/calendars/CalendarSyncFactory.php#L10-L20`.

```php
<?php
namespace Timetics\Core\Staffs\Calendars;

defined( 'ABSPATH' ) || exit;

class CalendarSyncFactory {
    /**
     * Get calendar services
     *
     * @param   string  $teamMemberId  Integer
     *
     * @return  array     Calendar services list
     */
    public static function getSyncServices(string $teamMemberId): array {
        // Fetch all calendars configured for this team member
        $calendars = timetics_connected_platforms( $teamMemberId );

        $services = [];

        foreach ( $calendars as $calendar ) {
            switch ( $calendar ) {
                case 'google-calendar':
                    $services[] = new GoogleCalendarSync();
                    break;

                default:
                    // Do nothing for unsupported platforms
                    break;
            }
        }

        return array_filter( $services ); // Remove any `null` values
    }
}

```
