ILIAS  release_7 Revision v7.30-3-g800a261c036
All Data Structures Namespaces Files Functions Variables Modules Pages
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 {
17  public static function getInstance($a_appointment)
18  {
19  include_once('./Services/Calendar/classes/class.ilCalendarCategoryAssignments.php');
20  $cat_id = ilCalendarCategoryAssignments::_lookupCategory($a_appointment['event']->getEntryId());
22  $cat_info["type"] = $cat->getType();
23  $cat_info["obj_id"] = $cat->getObjId();
24  $class_base = self::getClassBaseName($a_appointment);
25 
26 
27  // todo: provide more implementations
28  if (!in_array($class_base, array("Session", "Course", "ConsultationHours", "Exercise", "BookingPool"))) {
29  $class_base = "Dummy";
30  }
31 
32 
33  $class_name = "ilAppointment" . $class_base . "FileHandler";
34  require_once "./Services/Calendar/classes/FileHandler/class." . $class_name . ".php";
35 
36  return $class_name::getInstance($a_appointment);
37  }
38 }
static _lookupCategory($a_cal_id)
Lookup category id.
static getInstanceByCategoryId($a_cat_id)
Get instance by category id.