ILIAS  release_7 Revision v7.30-3-g800a261c036
All Data Structures Namespaces Files Functions Variables Modules Pages
class.ilAppointmentSessionFileHandler.php
Go to the documentation of this file.
1 <?php
2 
3 /* Copyright (c) 1998-2017 ILIAS open source, Extended GPL, see docs/LICENSE */
4 
6 
7 include_once("./Services/Calendar/interfaces/interface.ilAppointmentFileHandler.php");
8 include_once("./Services/Calendar/classes/FileHandler/class.ilAppointmentBaseFileHandler.php");
9 
17 {
24  public function getFiles() : array
25  {
26  $cat_info = $this->getCatInfo();
27 
28  include_once("./Services/Object/classes/class.ilObjectActivation.php");
29  $eventItems = ilObjectActivation::getItemsByEvent($cat_info['obj_id']);
30  $files = [];
31  foreach ($eventItems as $obj) {
32  if ($obj["type"] == "file") {
33  if ($this->access->checkAccessOfUser($this->user->getId(), "read", "", $obj['ref_id'])) {
34  $file = new ilObjFile($obj['ref_id']);
35  $file_property = new ilFileProperty();
36  $file_property->setAbsolutePath($file->getFile());
37  $file_property->setFileName($file->getFileName());
38 
39  $files[] = $file_property;
40  }
41  }
42  }
43  return $files;
44  }
45 }
Appointment file handler interface.
static getItemsByEvent($a_event_id)
Get session material / event items.
Base file handler class for appointment classes.