public function getEventInfo(?string $id = null, ?EntityInterface $calendar = null)
    {
        $result = [];

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

        $options = $this->getRecurrenceEventId($id);

        /** @var \Cake\ORM\Query $query */
        $query = $this->find()
                ->where(['id' => $options['id']])
                ->contain(['CalendarAttendees']);
        $result = $query->first();

        if (!($result instanceof EntityInterface)) {
            return [];
        }

        //@NOTE: we're faking the start/end intervals for recurring events
        if (!empty($options['end'])) {
            $time = Time::parse($options['end']);
            $result->set('end_date', $time);
            $result->set('end', $time);
            unset($time);
        }

        if (!empty($options['start'])) {
            $time = Time::parse($options['start']);
            $result->set('start_date', $time);
            $result->set('start', $time);
            unset($time);
        }

        if ($calendar) {
            if (empty($result->calendar_id)) {
                $result->set('calendar_id', $calendar->id);
            }
        }

        $result->set('color', $this->Calendars->getColor($calendar));

        return $result;
    }