protected function set_appointment(\scheduler_appointment $appointment) { $this->add_record_snapshot('scheduler_appointment', $appointment->data); $this->add_record_snapshot('scheduler_slots', $appointment->get_parent()->data); $this->add_record_snapshot('scheduler', $appointment->get_parent()->get_parent()->data); $this->appointment = $appointment; $this->data['objecttable'] = 'scheduler_appointments'; }