ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
class.ilAppointmentBookingPoolFileHandler.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 {
19  public function getFiles(): array
20  {
21  // context id is reservation id (see ilObjBookingPoolGUI->processBooking)
22  $res_id = $this->appointment['event']->getContextId();
23  $res = new ilBookingReservation($res_id);
24  $b_obj = new ilBookingObject($res->getObjectId());
25 
26  $files = [];
27 
28  if ($b_obj->getFile() !== "") {
29  $file_property = new ilFileProperty();
30  $file_property->setAbsolutePath($b_obj->getFileFullPath());
31  $file_property->setFileName($b_obj->getFile());
32  $files[] = $file_property;
33  }
34 
35  if ($b_obj->getPostFile() !== "") {
36  $file_property = new ilFileProperty();
37  $file_property->setAbsolutePath($b_obj->getPostFileFullPath());
38  $file_property->setFileName($b_obj->getPostFile());
39  $files[] = $file_property;
40  }
41 
42  return $files;
43  }
44 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
$res
Definition: ltiservices.php:69
Appointment file handler interface.
Base file handler class for appointment classes.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...