ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilAppointmentBookingPoolFileHandler.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
29{
33 public function getFiles(): array
34 {
35 global $DIC;
36
37 // context id is reservation id (see ilObjBookingPoolGUI->processBooking)
38 $res_id = $this->appointment['event']->getContextId();
39 $res = new ilBookingReservation($res_id);
40 $b_obj = new ilBookingObject($res->getObjectId());
41 $objects_manager = $DIC->bookingManager()->internal()->domain()->objects($b_obj->getPoolId());
42
43 $files = [];
44
45 if ($objects_manager->hasObjectInfo($b_obj->getId())) {
46 $file_property = new ilFileProperty();
47 $file_property->setAbsolutePath($objects_manager->getObjectInfoPath($b_obj->getId()));
48 $file_property->setFileName($objects_manager->getObjectInfoFilename($b_obj->getId()));
49 $files[] = $file_property;
50 }
51
52 if ($objects_manager->hasBookingInfo($b_obj->getId())) {
53 $file_property = new ilFileProperty();
54 $file_property->setAbsolutePath($objects_manager->getBookingInfoPath($b_obj->getId()));
55 $file_property->setFileName($objects_manager->getBookingInfoFilename($b_obj->getId()));
56 $files[] = $file_property;
57 }
58
59 return $files;
60 }
61}
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...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Appointment file handler interface.
$res
Definition: ltiservices.php:69
global $DIC
Definition: shib_login.php:26