ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
ilAppointmentBaseFileHandler Class Reference

Base file handler class for appointment classes. More...

+ Inheritance diagram for ilAppointmentBaseFileHandler:
+ Collaboration diagram for ilAppointmentBaseFileHandler:

Public Member Functions

 __construct ($a_appointment)
 Constructor. More...
 
 getCatId ($a_entry_id)
 
 getCatInfo ()
 

Static Public Member Functions

static getInstance ($a_appointment)
 Get instance. More...
 

Protected Attributes

 $appointment
 

Detailed Description

Base file handler class for appointment classes.

Author
Alex Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de

Definition at line 11 of file class.ilAppointmentBaseFileHandler.php.

Constructor & Destructor Documentation

◆ __construct()

ilAppointmentBaseFileHandler::__construct (   $a_appointment)

Constructor.

Parameters

Definition at line 20 of file class.ilAppointmentBaseFileHandler.php.

21 {
22 global $DIC;
23
24 $this->access = $DIC->access();
25 $this->rbacsystem = $DIC->rbac()->system();
26 $this->user = $DIC->user();
27
28 $this->appointment = $a_appointment;
29 }
user()
Definition: user.php:4
$DIC
Definition: xapitoken.php:46

References $DIC, and user().

+ Here is the call graph for this function:

Member Function Documentation

◆ getCatId()

ilAppointmentBaseFileHandler::getCatId (   $a_entry_id)

Definition at line 41 of file class.ilAppointmentBaseFileHandler.php.

42 {
44 }
static _lookupCategory($a_cal_id)
Lookup category id.

References ilCalendarCategoryAssignments\_lookupCategory().

Referenced by getCatInfo().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getCatInfo()

ilAppointmentBaseFileHandler::getCatInfo ( )

Definition at line 46 of file class.ilAppointmentBaseFileHandler.php.

47 {
48 $cat_id = $this->getCatId($this->appointment['event']->getEntryId());
49
51 $cat_info = array();
52 $cat_info["type"] = $cat->getType();
53 $cat_info["obj_id"] = $cat->getObjId();
54 $cat_info["title"] = $cat->getTitle();
55 $cat_info["cat_id"] = $cat_id;
56 $cat_info["editable"] = false;
57
58 switch ($cat_info["type"]) {
60 if ($cat_info["obj_id"] == $this->user->getId()) {
61 $cat_info["editable"] = true;
62 }
63 break;
64
66 $obj_type = ilObject::_lookupType($cat_info["obj_id"]);
67 if ($obj_type == 'crs' or $obj_type == 'grp') {
68 if (ilCalendarSettings::_getInstance()->lookupCalendarActivated($cat_info["obj_id"])) {
69 foreach (ilObject::_getAllReferences($cat_info["obj_id"]) as $ref_id) {
70 if ($this->access->checkAccess('edit_event', '', $ref_id)) {
71 $cat_info["editable"] = true;
72 }
73 }
74 }
75 }
76 break;
77
79 if ($this->rbacsystem->checkAccess('edit_event', ilCalendarSettings::_getInstance()->getCalendarSettingsId())) {
80 $cat_info["editable"] = true;
81 }
82 break;
83 }
84
85 return $cat_info;
86 }
static getInstanceByCategoryId($a_cat_id)
Get instance by category id.
static _getInstance()
get singleton instance
static _getAllReferences($a_id)
get all reference ids of object
static _lookupType($a_id, $a_reference=false)
lookup object type

References ilObject\_getAllReferences(), ilCalendarSettings\_getInstance(), ilObject\_lookupType(), getCatId(), ilCalendarCategory\getInstanceByCategoryId(), ilCalendarCategory\TYPE_GLOBAL, ilCalendarCategory\TYPE_OBJ, ilCalendarCategory\TYPE_USR, and user().

Referenced by ilAppointmentCourseFileHandler\getFiles(), and ilAppointmentSessionFileHandler\getFiles().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getInstance()

static ilAppointmentBaseFileHandler::getInstance (   $a_appointment)
static

Get instance.

Returns
self

Definition at line 36 of file class.ilAppointmentBaseFileHandler.php.

37 {
38 return new static($a_appointment);
39 }

Field Documentation

◆ $appointment

ilAppointmentBaseFileHandler::$appointment
protected

Definition at line 13 of file class.ilAppointmentBaseFileHandler.php.


The documentation for this class was generated from the following file: