ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
class.ilAppointmentPresentationFactory.php
Go to the documentation of this file.
1 <?php
2 
3 include_once("./Services/Calendar/classes/Appointment/class.ilCalendarAppointmentBaseFactory.php");
4 
14 {
15  public static function getInstance($a_appointment, $a_info_screen, $a_toolbar, $a_list_item)
16  {
17  global $DIC;
18 
19  $lng = $DIC['lng'];
20 
21  include_once('./Services/Calendar/classes/class.ilCalendarCategoryAssignments.php');
22 
23  //get object info
24  $cat_id = ilCalendarCategoryAssignments::_lookupCategory($a_appointment['event']->getEntryId());
25  //echo "---";
26  //var_dump($cat_id);
27  //$cat_info = ilCalendarCategories::_getInstance()->getCategoryInfo($cat_id);
29  $cat_info["type"] = $cat->getType();
30  $cat_info["obj_id"] = $cat->getObjId();
31  //var_dump($cat_info['obj_id']);
32  //var_dump(ilObject::_lookupType($cat_info['obj_id']));
33  //ilUtil::printBacktrace(10); exit;
34 
35  $class_base = self::getClassBaseName($a_appointment);
36 
37  $class_name = "ilAppointmentPresentation" . $class_base . "GUI";
38  require_once "./Services/Calendar/classes/AppointmentPresentation/class." . $class_name . ".php";
39 
40  return $class_name::getInstance($a_appointment, $a_info_screen, $a_toolbar, $a_list_item);
41  }
42 }
static _lookupCategory($a_cal_id)
Lookup category id.
global $DIC
Definition: saml.php:7
$lng
static getInstance($a_appointment, $a_info_screen, $a_toolbar, $a_list_item)
static getInstanceByCategoryId($a_cat_id)
Get instance by category id.