ILIAS  trunk Revision v11.0_alpha-2662-g519ff7d528f
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 28 of file class.ilAppointmentPresentationBookingPoolGUI.php.

References ilAppointmentPresentationGUI\$appointment, $DIC, 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().

28  : void
29  {
30  global $DIC;
31 
32  $a_app = $this->appointment;
33  $cat_info = $this->getCatInfo();
34 
35  $this->lng->loadLanguageModule("book");
36 
37  // context id is reservation id (see ilObjBookingPoolGUI->processBooking)
38  $res_id = $a_app['event']->getContextId();
39  $res = new ilBookingReservation($res_id);
40  $b_obj = new ilBookingObject($res->getObjectId());
41  $obj_id = $b_obj->getPoolId();
42  $objects_manager = $DIC->bookingManager()->internal()->domain()->objects($obj_id);
43 
44  $refs = $this->getReadableRefIds($obj_id);
45 
46  // add common section (title, description, object/calendar, location)
47  //$this->addCommonSection($a_app, $obj_id, $cat_info);
48 
49  if (count($refs) > 0) {
50  $this->addInfoSection($b_obj->getTitle());
51 
52  // object description
53  if ($b_obj->getDescription()) {
54  $this->addInfoProperty($this->lng->txt("description"), $b_obj->getDescription());
55  }
56 
57  $this->addObjectLinks($obj_id, $this->appointment);
58 
59  //object info (course, grp...)
60  //$this->addContainerInfo($obj_id);
61 
62  //link to personal bookings
63  $this->addCalendarInfo($cat_info);
64 
65  // section: booking information
66  if ($b_obj->getDescription() || $objects_manager->hasObjectInfo($b_obj->getId())) {
67  $this->addInfoSection($this->lng->txt("book_booking_information"));
68  }
69 
70  $ref_id = current($refs);
71 
72  $this->ctrl->setParameterByClass("ilObjBookingPoolGUI", "ref_id", $ref_id);
73  $this->ctrl->setParameterByClass("ilbookingobjectgui", "object_id", $res->getObjectId());
74 
75  // info file
76  if ($objects_manager->hasObjectInfo($b_obj->getId())) {
77  $this->has_files = true;
78  $link = $this->ctrl->getLinkTargetByClass(array("ilRepositoryGUI",
79  "ilObjBookingPoolGUI",
80  "ilbookingobjectgui"
81  ), "deliverInfo");
82 
83  $link = $this->ui->renderer()->render(
84  $this->ui->factory()->button()->shy($objects_manager->getObjectInfoFilename($b_obj->getId()), $link)
85  );
86 
87  $this->addInfoProperty($this->lng->txt("book_additional_info_file"), $link);
88  }
89 
90  // post file
91  $array_info = array();
92  if (($text = $b_obj->getPostText()) != "") {
94  $a_app['event']->getStart(),
95  $a_app['event']->getEnd()
96  );
97  $text = str_replace("[OBJECT]", $b_obj->getTitle(), $text);
98  $text = str_replace("[PERIOD]", $period, $text);
99  $array_info[] = $text;
100  }
101  if ($objects_manager->hasBookingInfo($b_obj->getId())) {
102  $this->has_files = true;
103 
104  $link = $this->ctrl->getLinkTargetByClass(array("ilRepositoryGUI",
105  "ilObjBookingPoolGUI",
106  "ilbookingobjectgui",
107  "ilBookingProcessWithScheduleGUI"
108  ), "deliverPostFile");
109 
110  $array_info[] = $this->ui->renderer()->render(
111  $this->ui->factory()->button()->shy($objects_manager->getBookingInfoFilename($b_obj->getId()), $link)
112  );
113  }
114  if ($array_info) {
115  $this->addInfoProperty($this->lng->txt("book_post_booking_information"), implode("<br>", $array_info));
116  }
117  }
118 
119  $this->ctrl->setParameterByClass('ilcalendarappointmentgui', 'app_id', $a_app['event']->getEntryId());
120  $this->addAction(
121  $this->lng->txt("cal_ch_cancel_booking"),
122  $this->ctrl->getLinkTargetByClass('ilcalendarappointmentgui', 'cancelBooking')
123  );
124 
125  if (count($refs) > 0) {
126  $this->addAction($this->lng->txt("book_open"), ilLink::_getStaticLink(current($refs)));
127  }
128 
129  $this->addMetaData('book', $obj_id, "bobj", $res->getObjectId());
130  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
$res
Definition: ltiservices.php:66
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:65
global $DIC
Definition: shib_login.php:26
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...
static formatPeriod(ilDateTime $start, ilDateTime $end, bool $a_skip_starting_day=false, ?ilObjUser $user=null)
Format a period of two dates Shows: 14.
+ Here is the call graph for this function:

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