public function sync(EntityInterface $calendar, array $options = []): array
    {
        $result = [];

        if (empty($calendar)) {
            return $result;
        }

        $event = new Event((string)EventName::PLUGIN_CALENDAR_MODEL_GET_EVENTS(), $this, [
            'calendar' => $calendar,
            'options' => $options,
        ]);

        EventManager::instance()->dispatch($event);

        $calendarEvents = $event->result;
        if (empty($calendarEvents)) {
            return $result;
        }

        foreach ($calendarEvents as $calendarInfo) {
            if (empty($calendarInfo['events'])) {
                continue;
            }
        }

        return $result;
    }