ILIAS  trunk Revision v5.2.0beta1-34132-g2d4d73d4a0
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 12 of file class.ilAppointmentBaseFileHandler.php.

Constructor & Destructor Documentation

◆ __construct()

ilAppointmentBaseFileHandler::__construct ( array  $a_appointment)

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

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

22  {
23  global $DIC;
24 
25  $this->access = $DIC->access();
26  $this->rbacsystem = $DIC->rbac()->system();
27  $this->user = $DIC->user();
28  $this->logger = $DIC->logger()->cal();
29  $this->appointment = $a_appointment;
30  }
$DIC
Definition: xapitoken.php:62
+ Here is the call graph for this function:

Member Function Documentation

◆ getCatId()

ilAppointmentBaseFileHandler::getCatId ( int  $a_entry_id)

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

References ilCalendarCategoryAssignments\_lookupCategory().

Referenced by getCatInfo().

32  : int
33  {
35  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getCatInfo()

ilAppointmentBaseFileHandler::getCatInfo ( )
Returns
array

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

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().

40  : array
41  {
42  $cat_id = $this->getCatId($this->appointment['event']->getEntryId());
43 
45  $cat_info = array();
46  $cat_info["type"] = $cat->getType();
47  $cat_info["obj_id"] = $cat->getObjId();
48  $cat_info["title"] = $cat->getTitle();
49  $cat_info["cat_id"] = $cat_id;
50  $cat_info["editable"] = false;
51 
52  switch ($cat_info["type"]) {
54  if ($cat_info["obj_id"] == $this->user->getId()) {
55  $cat_info["editable"] = true;
56  }
57  break;
58 
60  $obj_type = ilObject::_lookupType($cat_info["obj_id"]);
61  if ($obj_type == 'crs' or $obj_type == 'grp') {
62  if (ilCalendarSettings::_getInstance()->lookupCalendarActivated($cat_info["obj_id"])) {
63  foreach (ilObject::_getAllReferences($cat_info["obj_id"]) as $ref_id) {
64  if ($this->access->checkAccess('edit_event', '', $ref_id)) {
65  $cat_info["editable"] = true;
66  }
67  }
68  }
69  }
70  break;
71 
73  if ($this->rbacsystem->checkAccess(
74  'edit_event',
75  ilCalendarSettings::_getInstance()->getCalendarSettingsId()
76  )) {
77  $cat_info["editable"] = true;
78  }
79  break;
80  }
81  return $cat_info;
82  }
static _getAllReferences(int $id)
get all reference ids for object ID
$ref_id
Definition: ltiauth.php:65
static getInstanceByCategoryId(int $a_cat_id)
static _lookupType(int $id, bool $reference=false)
+ 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 17 of file class.ilAppointmentBaseFileHandler.php.

◆ $appointment

array ilAppointmentBaseFileHandler::$appointment
protected

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

◆ $logger

ilLogger ilAppointmentBaseFileHandler::$logger
protected

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

◆ $rbacsystem

ilRbacSystem ilAppointmentBaseFileHandler::$rbacsystem
protected

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

◆ $user

ilObjUser ilAppointmentBaseFileHandler::$user
protected

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


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