ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
class.ilCalendarAppointmentBaseFactory.php
Go to the documentation of this file.
1<?php
11{
12 public static function getClassBaseName($a_appointment)
13 {
14 include_once('./Services/Calendar/classes/class.ilCalendarCategoryAssignments.php');
15 $cat_id = ilCalendarCategoryAssignments::_lookupCategory($a_appointment['event']->getEntryId());
17 $cat_info["type"] = $cat->getType();
18 $cat_info["obj_id"] = $cat->getObjId();
19
20 if ($a_appointment['event']->isMilestone()) {
21 return "Milestone";
22 }
23
24 switch ($cat_info['type']) {
26 $type = ilObject::_lookupType($cat_info['obj_id']);
27 switch ($type) {
28 case "crs":
29 return "Course";
30
31 case "grp":
32 return "Group";
33
34 case "sess":
35 return "Session";
36
37 case "exc":
38 return "Exercise";
39
40 default:
41 return "";
42 }
43 break;
45 return "User";
46
48 return "Public";
49
51 return "ConsultationHours";
52
54 return "BookingPool";
55
56 default:
57 return "";
58 }
59 }
60}
An exception for terminatinating execution or to throw for unit testing.
static _lookupCategory($a_cal_id)
Lookup category id.
static getInstanceByCategoryId($a_cat_id)
Get instance by category id.
static _lookupType($a_id, $a_reference=false)
lookup object type
$type