ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilAppointmentBaseFileHandler Class Reference

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

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

Public Member Functions

 __construct (array $a_appointment)
 
 getCatId (int $a_entry_id)
 
 getCatInfo ()
 

Protected Attributes

array $appointment
 
ilLogger $logger
 
ilAccessHandler $access
 
ilRbacSystem $rbacsystem
 
ilObjUser $user
 

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 26 of file class.ilAppointmentBaseFileHandler.php.

Constructor & Destructor Documentation

◆ __construct()

ilAppointmentBaseFileHandler::__construct ( array  $a_appointment)

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

36 {
37 global $DIC;
38
39 $this->access = $DIC->access();
40 $this->rbacsystem = $DIC->rbac()->system();
41 $this->user = $DIC->user();
42 $this->logger = $DIC->logger()->cal();
43 $this->appointment = $a_appointment;
44 }
global $DIC
Definition: shib_login.php:26

References $DIC, ILIAS\Repository\access(), ILIAS\Repository\logger(), and ILIAS\Repository\user().

+ Here is the call graph for this function:

Member Function Documentation

◆ getCatId()

ilAppointmentBaseFileHandler::getCatId ( int  $a_entry_id)

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

46 : int
47 {
49 }

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 ( )
Returns
array

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

54 : array
55 {
56 $cat_id = $this->getCatId($this->appointment['event']->getEntryId());
57
59 $cat_info = array();
60 $cat_info["type"] = $cat->getType();
61 $cat_info["obj_id"] = $cat->getObjId();
62 $cat_info["title"] = $cat->getTitle();
63 $cat_info["cat_id"] = $cat_id;
64 $cat_info["editable"] = false;
65
66 switch ($cat_info["type"]) {
68 if ($cat_info["obj_id"] == $this->user->getId()) {
69 $cat_info["editable"] = true;
70 }
71 break;
72
74 $obj_type = ilObject::_lookupType($cat_info["obj_id"]);
75 if ($obj_type == 'crs' or $obj_type == 'grp') {
76 if (ilCalendarSettings::_getInstance()->lookupCalendarActivated($cat_info["obj_id"])) {
77 foreach (ilObject::_getAllReferences($cat_info["obj_id"]) as $ref_id) {
78 if ($this->access->checkAccess('edit_event', '', $ref_id)) {
79 $cat_info["editable"] = true;
80 }
81 }
82 }
83 }
84 break;
85
87 if ($this->rbacsystem->checkAccess(
88 'edit_event',
89 ilCalendarSettings::_getInstance()->getCalendarSettingsId()
90 )) {
91 $cat_info["editable"] = true;
92 }
93 break;
94 }
95 return $cat_info;
96 }
static getInstanceByCategoryId(int $a_cat_id)
static _lookupType(int $id, bool $reference=false)
static _getAllReferences(int $id)
get all reference ids for object ID
$ref_id
Definition: ltiauth.php:66

References $ref_id, ilObject\_getAllReferences(), ilCalendarSettings\_getInstance(), ilObject\_lookupType(), ILIAS\Repository\access(), getCatId(), ilCalendarCategory\getInstanceByCategoryId(), ilCalendarCategory\TYPE_GLOBAL, ilCalendarCategory\TYPE_OBJ, ilCalendarCategory\TYPE_USR, and ILIAS\Repository\user().

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

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

Field Documentation

◆ $access

ilAccessHandler ilAppointmentBaseFileHandler::$access
protected

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

◆ $appointment

array ilAppointmentBaseFileHandler::$appointment
protected

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

◆ $logger

ilLogger ilAppointmentBaseFileHandler::$logger
protected

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

◆ $rbacsystem

ilRbacSystem ilAppointmentBaseFileHandler::$rbacsystem
protected

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

◆ $user

ilObjUser ilAppointmentBaseFileHandler::$user
protected

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


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