ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilAppointmentFileHandlerFactory.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
26{
32 public static function getInstance(array $a_appointment): ilAppointmentFileHandler
33 {
34 $cat_id = ilCalendarCategoryAssignments::_lookupCategory($a_appointment['event']->getEntryId());
36 $cat_info["type"] = $cat->getType();
37 $cat_info["obj_id"] = $cat->getObjId();
38 $class_base = self::getClassBaseName($a_appointment);
39
40 if (!in_array($class_base, ["Session", "Course", "ConsultationHours", "Exercise", "BookingPool"])) {
41 $class_base = "Dummy";
42 }
43 $class_name = "ilAppointment" . $class_base . "FileHandler";
44 return new $class_name($a_appointment);
45 }
46}
static getInstanceByCategoryId(int $a_cat_id)
Appointment file handler interface.