public function set_properties(array $properties) { $content = new CalendarEventContent(); $content->set_properties($properties); $this->id = $properties['id_event']; $this->content = $content; $this->start_date = !empty($properties['start_date']) ? new Date($properties['start_date'], Timezone::SERVER_TIMEZONE) : null; $this->end_date = !empty($properties['end_date']) ? new Date($properties['end_date'], Timezone::SERVER_TIMEZONE) : null; $this->parent_id = $properties['parent_id']; }