/** * @access public * @global array $registry * @return render pop-up with appointment details */ public function showDetails() { if (isset($_POST['schedule_id'])) { global $registry; $schedule = new Schedules(); $appointment = $schedule->getAppointment($_POST['schedule_id']); $this->registry['template']->data('info', $appointment[0]); $employee_object = new Employees(); $employees = $employee_object->listEmployees(); if ($employees) { $this->registry['template']->data('employees', $employees); } echo $this->registry['template']->render('schedule/popup'); } }