$venueIds Venue post IDs. * @param list $organizerIds Organizer post IDs. * @param array $schedule Daily schedule or continuous mode. */ public function __construct( public readonly int $id, public readonly string $title, public readonly string $description, public readonly string $excerpt, public readonly DateTimeImmutable $startLocal, public readonly DateTimeImmutable $endLocal, public readonly string $timezone, public readonly bool $allDay, public readonly string $status, public readonly string $mode, public readonly bool $featured, public readonly string $cost, public readonly string $currency, public readonly string $website, public readonly string $virtualUrl, public readonly array $venueIds, public readonly array $organizerIds, public readonly array $schedule = ['type' => 'continuous'], ) { } /** @return array */ public function toArray(): array { return [ 'id' => $this->id, 'title' => $this->title, 'description' => $this->description, 'excerpt' => $this->excerpt, 'start_local' => $this->startLocal->format(DATE_ATOM), 'end_local' => $this->endLocal->format(DATE_ATOM), 'start_utc' => $this->startLocal->setTimezone(new \DateTimeZone('UTC'))->format(DATE_ATOM), 'end_utc' => $this->endLocal->setTimezone(new \DateTimeZone('UTC'))->format(DATE_ATOM), 'timezone' => $this->timezone, 'all_day' => $this->allDay, 'status' => $this->status, 'mode' => $this->mode, 'featured' => $this->featured, 'cost' => $this->cost, 'currency' => $this->currency, 'website' => $this->website, 'virtual_url' => $this->virtualUrl, 'venue_ids' => $this->venueIds, 'location' => \ProCalendarWP\Maps\Location::publicData($this->id), 'organizer_ids' => $this->organizerIds, 'schedule' => $this->schedule, 'link' => (string) get_permalink($this->id), ]; } }