ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
class.ilAppointmentFileHandlerFactory.php
Go to the documentation of this file.
1 <?php
2 
3 include_once("./Services/Calendar/classes/Appointment/class.ilCalendarAppointmentBaseFactory.php");
4 
12 {
13  public static function getInstance($a_appointment)
14  {
15  include_once('./Services/Calendar/classes/class.ilCalendarCategoryAssignments.php');
16  $cat_id = ilCalendarCategoryAssignments::_lookupCategory($a_appointment['event']->getEntryId());
18  $cat_info["type"] = $cat->getType();
19  $cat_info["obj_id"] = $cat->getObjId();
20  $class_base = self::getClassBaseName($a_appointment);
21 
22 
23  // todo: provide more implementations
24  if (!in_array($class_base, array("Session", "Course", "ConsultationHours", "Exercise", "BookingPool"))) {
25  $class_base = "Dummy";
26  }
27 
28 
29  $class_name = "ilAppointment" . $class_base . "FileHandler";
30  require_once "./Services/Calendar/classes/FileHandler/class." . $class_name . ".php";
31 
32  return $class_name::getInstance($a_appointment);
33  }
34 }
static _lookupCategory($a_cal_id)
Lookup category id.
static getInstanceByCategoryId($a_cat_id)
Get instance by category id.