ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
class.ilAppointmentSessionFileHandler.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
5 /* Copyright (c) 1998-2017 ILIAS open source, Extended GPL, see docs/LICENSE */
6 
8 
15 {
21  public function getFiles(): array
22  {
23  $cat_info = $this->getCatInfo();
24 
25  $eventItems = ilObjectActivation::getItemsByEvent($cat_info['obj_id']);
26  $files = [];
27  foreach ($eventItems as $obj) {
28  if ($obj["type"] == "file") {
29  if ($this->access->checkAccessOfUser($this->user->getId(), "read", "", (int)$obj['ref_id'])) {
30  $file = new ilObjFile((int)$obj['ref_id']);
31  $file_property = new ilFileProperty();
32  $file_property->setAbsolutePath($file->getFile());
33  $file_property->setFileName($file->getFileName());
34  $files[] = $file_property;
35  }
36  }
37  }
38  return $files;
39  }
40 }
Appointment file handler interface.
static getItemsByEvent(int $event_id)
Get session material / event items.
Class ilObjFile.
Base file handler class for appointment classes.