ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilAppointmentPresentationBookingPoolGUI Class Reference
+ Inheritance diagram for ilAppointmentPresentationBookingPoolGUI:
+ Collaboration diagram for ilAppointmentPresentationBookingPoolGUI:

Public Member Functions

 collectPropertiesAndActions ()
 
- Public Member Functions inherited from ilAppointmentPresentationGUI
 __construct (array $a_appointment, ?ilInfoScreenGUI $a_info_screen, ?ilToolbarGUI $a_toolbar, ?Item $a_list_item)
 
 getObjIdForAppointment ()
 
 getToolbar ()
 
 getListItem ()
 Get list item. More...
 
 getInfoScreen ()
 
 getCatId (int $a_entry_id)
 
 getCatInfo ()
 
 executeCommand ()
 
 getHTML ()
 
 addContainerInfo (int $a_obj_id)
 Add course/group container info. More...
 
 addInfoSection (string $a_txt)
 Add info section. More...
 
 addInfoProperty (string $a_txt, string $a_val)
 Add info property. More...
 
 addListItemProperty (string $a_txt, string $a_val)
 Add list item property. More...
 
 addAction (string $a_txt, string $a_link)
 Add action. More...
 
 collectPropertiesAndActions ()
 Collect properties and actions. More...
 
 collectStandardPropertiesAndActions ()
 Collect standard properties and actions. More...
 
 addObjectLinks (int $obj_id, ?array $a_appointment=null)
 Add object link. More...
 
 getReadableRefIds (int $a_obj_id)
 
 addEventDescription (array $a_app)
 Add event description. More...
 
 addEventLocation (array $a_app)
 Add event location. More...
 
 addLastUpdate (array $a_app)
 Add last update. More...
 
 addCalendarInfo (array $cat_info)
 
 addCommonSection (array $a_app, int $a_obj_id=0, ?array $cat_info=null, bool $a_container_info=false)
 
 addMetaData (string $a_obj_type, int $a_obj_id, ?string $a_sub_obj_type=null, ?int $a_sub_obj_id=null)
 
 getUserName (int $a_user_id, bool $a_force_name=false)
 Get (linked if possible) user name. More...
 
 downloadFiles ()
 Download files from an appointment ( Modals ) More...
 

Additional Inherited Members

- Static Public Member Functions inherited from ilAppointmentPresentationGUI
static getInstance (array $a_appointment, ?ilInfoScreenGUI $a_info_screen, ?ilToolbarGUI $a_toolbar, ?Item $a_list_item)
 
- Protected Member Functions inherited from ilAppointmentPresentationGUI
 readObjIdForAppointment ()
 read obj_id for appointment More...
 
 buildDirectLinkForAppointment (int $a_ref_id, ?array $a_appointment=null)
 Build direct link for appointment. More...
 
- Protected Attributes inherited from ilAppointmentPresentationGUI
array $appointment
 
ilToolbarGUI $toolbar
 
ilInfoScreenGUI $infoscreen
 
ilLanguage $lng
 
ilTree $tree
 
UIServices $ui
 
ilCtrlInterface $ctrl
 
ilAccessHandler $access
 
ilRbacSystem $rbacsystem
 
ilObjUser $user
 
RefineryFactory $refinery
 
HttpServices $http
 
Item $list_item = null
 
array $info_items = []
 
array $list_properties = []
 
array $actions = []
 
array $readable_ref_ids
 
bool $has_files = false
 
int $obj_id = 0
 
- Static Protected Attributes inherited from ilAppointmentPresentationGUI
static self $instance
 

Detailed Description

Member Function Documentation

◆ collectPropertiesAndActions()

ilAppointmentPresentationBookingPoolGUI::collectPropertiesAndActions ( )

Definition at line 12 of file class.ilAppointmentPresentationBookingPoolGUI.php.

References ilAppointmentPresentationGUI\$appointment, ilAppointmentPresentationGUI\$obj_id, $ref_id, $res, ilLink\_getStaticLink(), ilAppointmentPresentationGUI\addAction(), ilAppointmentPresentationGUI\addCalendarInfo(), ilAppointmentPresentationGUI\addInfoProperty(), ilAppointmentPresentationGUI\addInfoSection(), ilAppointmentPresentationGUI\addMetaData(), ilAppointmentPresentationGUI\addObjectLinks(), ILIAS\Repository\ctrl(), ilDatePresentation\formatPeriod(), ilAppointmentPresentationGUI\getCatInfo(), ilAppointmentPresentationGUI\getReadableRefIds(), ILIAS\Repository\lng(), and ILIAS\Repository\ui().

12  : void
13  {
14  $a_app = $this->appointment;
15  $cat_info = $this->getCatInfo();
16 
17  $this->lng->loadLanguageModule("book");
18 
19  // context id is reservation id (see ilObjBookingPoolGUI->processBooking)
20  $res_id = $a_app['event']->getContextId();
21  $res = new ilBookingReservation($res_id);
22  $b_obj = new ilBookingObject($res->getObjectId());
23  $obj_id = $b_obj->getPoolId();
24 
25  $refs = $this->getReadableRefIds($obj_id);
26 
27  // add common section (title, description, object/calendar, location)
28  //$this->addCommonSection($a_app, $obj_id, $cat_info);
29 
30  if (count($refs) > 0) {
31  $this->addInfoSection($b_obj->getTitle());
32 
33  // object description
34  if ($b_obj->getDescription()) {
35  $this->addInfoProperty($this->lng->txt("description"), $b_obj->getDescription());
36  }
37 
38  $this->addObjectLinks($obj_id, $this->appointment);
39 
40  //object info (course, grp...)
41  //$this->addContainerInfo($obj_id);
42 
43  //link to personal bookings
44  $this->addCalendarInfo($cat_info);
45 
46  // section: booking information
47  if ($b_obj->getDescription() || $b_obj->getFile()) {
48  $this->addInfoSection($this->lng->txt("book_booking_information"));
49  }
50 
51  $ref_id = current($refs);
52 
53  $this->ctrl->setParameterByClass("ilObjBookingPoolGUI", "ref_id", $ref_id);
54  $this->ctrl->setParameterByClass("ilbookingobjectgui", "object_id", $res->getObjectId());
55 
56  // info file
57  if ($b_obj->getFile()) {
58  $this->has_files = true;
59  $link = $this->ctrl->getLinkTargetByClass(array("ilRepositoryGUI",
60  "ilObjBookingPoolGUI",
61  "ilbookingobjectgui"
62  ), "deliverInfo");
63 
64  $link = $this->ui->renderer()->render(
65  $this->ui->factory()->button()->shy($b_obj->getFile(), $link)
66  );
67 
68  $this->addInfoProperty($this->lng->txt("book_additional_info_file"), $link);
69  }
70 
71  // post file
72  $array_info = array();
73  if (($text = $b_obj->getPostText()) != "") {
75  $a_app['event']->getStart(),
76  $a_app['event']->getEnd()
77  );
78  $text = str_replace("[OBJECT]", $b_obj->getTitle(), $text);
79  $text = str_replace("[PERIOD]", $period, $text);
80  $array_info[] = $text;
81  }
82  if ($b_obj->getPostFile()) {
83  $this->has_files = true;
84 
85  $link = $this->ctrl->getLinkTargetByClass(array("ilRepositoryGUI",
86  "ilObjBookingPoolGUI",
87  "ilbookingobjectgui",
88  "ilBookingProcessGUI"
89  ), "deliverPostFile");
90 
91  $array_info[] = $this->ui->renderer()->render(
92  $this->ui->factory()->button()->shy($b_obj->getPostFile(), $link)
93  );
94  }
95  if ($array_info) {
96  $this->addInfoProperty($this->lng->txt("book_post_booking_information"), implode("<br>", $array_info));
97  }
98  }
99 
100  $this->ctrl->setParameterByClass('ilcalendarappointmentgui', 'app_id', $a_app['event']->getEntryId());
101  $this->addAction(
102  $this->lng->txt("cal_ch_cancel_booking"),
103  $this->ctrl->getLinkTargetByClass('ilcalendarappointmentgui', 'cancelBooking')
104  );
105 
106  if (count($refs) > 0) {
107  $this->addAction($this->lng->txt("book_open"), ilLink::_getStaticLink(current($refs)));
108  }
109 
110  $this->addMetaData('book', $obj_id, "bobj", $res->getObjectId());
111  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
$res
Definition: ltiservices.php:69
addObjectLinks(int $obj_id, ?array $a_appointment=null)
Add object link.
addInfoSection(string $a_txt)
Add info section.
addInfoProperty(string $a_txt, string $a_val)
Add info property.
$ref_id
Definition: ltiauth.php:67
static formatPeriod(ilDateTime $start, ilDateTime $end, bool $a_skip_starting_day=false)
Format a period of two dates Shows: 14.
addAction(string $a_txt, string $a_link)
Add action.
addMetaData(string $a_obj_type, int $a_obj_id, ?string $a_sub_obj_type=null, ?int $a_sub_obj_id=null)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

The documentation for this class was generated from the following file: