ILIAS  release_7 Revision v7.30-3-g800a261c036
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
7include_once("./Services/Calendar/interfaces/interface.ilAppointmentFileHandler.php");
8include_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}
An exception for terminatinating execution or to throw for unit testing.
Base file handler class for appointment classes.
Class ilObjFile.
static getItemsByEvent($a_event_id)
Get session material / event items.
Appointment file handler interface.