ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilAppointmentSessionFileHandler.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
29{
35 public function getFiles(): array
36 {
37 $cat_info = $this->getCatInfo();
38
39 $eventItems = ilObjectActivation::getItemsByEvent($cat_info['obj_id']);
40 $files = [];
41 foreach ($eventItems as $obj) {
42 if ($obj["type"] == "file") {
43 if ($this->access->checkAccessOfUser($this->user->getId(), "read", "", (int)$obj['ref_id'])) {
44 $file = new ilObjFile((int)$obj['ref_id']);
45 $file_property = new ilFileProperty();
46 $file_property->setAbsolutePath($file->getFile());
47 $file_property->setFileName($file->getFileName());
48 $files[] = $file_property;
49 }
50 }
51 }
52 return $files;
53 }
54}
Base file handler class for appointment classes.
Class ilObjFile.
static getItemsByEvent(int $event_id)
Get session material / event items.
Appointment file handler interface.