ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilAppointmentPresentationBookingPoolGUI Class Reference
+ Inheritance diagram for ilAppointmentPresentationBookingPoolGUI:
+ Collaboration diagram for ilAppointmentPresentationBookingPoolGUI:

Public Member Functions

 collectPropertiesAndActions ()
 
- Public Member Functions inherited from ilAppointmentPresentationGUI
 __construct ($a_appointment, $a_info_screen, $a_toolbar, $a_list_item)
 
 getObjIdForAppointment ()
 
 getToolbar ()
 
 getListItem ()
 Get list item. More...
 
 getInfoScreen ()
 
 getCatId ($a_entry_id)
 
 getCatInfo ()
 
 executeCommand ()
 
 getHTML ()
 Get HTML. More...
 
 addContainerInfo ($a_obj_id)
 Add course/group container info. More...
 
 addInfoSection ($a_txt)
 Add info section. More...
 
 addInfoProperty ($a_txt, $a_val)
 Add info property. More...
 
 addListItemProperty ($a_txt, $a_val)
 Add list item property. More...
 
 addAction ($a_txt, $a_link)
 Add action. More...
 
 collectPropertiesAndActions ()
 Collect properties and actions. More...
 
 collectStandardPropertiesAndActions ()
 Collect standard properties and actions. More...
 
 addObjectLinks ($obj_id)
 Add object link. More...
 
 getReadableRefIds ($a_obj_id)
 Get readable ref ids. More...
 
 addEventDescription ($a_app)
 Add event description. More...
 
 addEventLocation ($a_app)
 Add event location. More...
 
 addLastUpdate ($a_app)
 Add last update. More...
 
 addCalendarInfo ($cat_info)
 Add calendar info. More...
 
 addCommonSection ($a_app, $a_obj_id=0, $cat_info=null, $a_container_info=false)
 Add common section. More...
 
 addMetaData ($a_obj_type, $a_obj_id, $a_sub_obj_type=null, $a_sub_obj_id=null)
 Add metadata. More...
 
 getUserName ($a_user_id, $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 ($a_appointment, $a_info_screen, $a_toolbar, $a_list_item)
 
- Protected Member Functions inherited from ilAppointmentPresentationGUI
 readObjIdForAppointment ()
 read obj_id for appointment More...
 
- Protected Attributes inherited from ilAppointmentPresentationGUI
 $toolbar
 
 $appointment
 
 $infoscreen
 
 $lng
 
 $tree
 
 $ui
 
 $list_item = null
 
 $info_items = array()
 
 $list_properties = array()
 
 $actions = array()
 
 $ctrl
 
 $access
 
 $readable_ref_ids
 
 $has_files = false
 
 $obj_id = 0
 
- Static Protected Attributes inherited from ilAppointmentPresentationGUI
static $instance
 

Detailed Description

Member Function Documentation

◆ collectPropertiesAndActions()

ilAppointmentPresentationBookingPoolGUI::collectPropertiesAndActions ( )

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

References ilAppointmentPresentationGUI\$appointment, ilAppointmentPresentationGUI\$obj_id, $res, ilLink\_getStaticLink(), ilAppointmentPresentationGUI\addAction(), ilAppointmentPresentationGUI\addCalendarInfo(), ilAppointmentPresentationGUI\addInfoProperty(), ilAppointmentPresentationGUI\addInfoSection(), ilAppointmentPresentationGUI\addMetaData(), ilAppointmentPresentationGUI\addObjectLinks(), array, ilAppointmentPresentationGUI\getCatInfo(), and ilAppointmentPresentationGUI\getReadableRefIds().

17  {
18  $a_app = $this->appointment;
19  $cat_info = $this->getCatInfo();
20 
21  $this->lng->loadLanguageModule("book");
22 
23  // context id is reservation id (see ilObjBookingPoolGUI->processBooking)
24  $res_id = $a_app['event']->getContextId();
25  include_once("./Modules/BookingManager/classes/class.ilBookingReservation.php");
26  include_once("./Modules/BookingManager/classes/class.ilBookingObject.php");
27  $res = new ilBookingReservation($res_id);
28  $b_obj = new ilBookingObject($res->getObjectId());
29  $obj_id = $b_obj->getPoolId();
30 
31  $refs = $this->getReadableRefIds($obj_id);
32 
33  // add common section (title, description, object/calendar, location)
34  //$this->addCommonSection($a_app, $obj_id, $cat_info);
35 
36  if (count($refs) > 0) {
37  $this->addInfoSection($b_obj->getTitle());
38 
39  // object description
40  if ($b_obj->getDescription()) {
41  $this->addInfoProperty($this->lng->txt("description"), $b_obj->getDescription());
42  }
43 
44  $this->addObjectLinks($obj_id);
45 
46  //object info (course, grp...)
47  //$this->addContainerInfo($obj_id);
48 
49  //link to personal bookings
50  $this->addCalendarInfo($cat_info);
51 
52  // section: booking information
53  if ($b_obj->getDescription() || $b_obj->getFile()) {
54  $this->addInfoSection($this->lng->txt("book_booking_information"));
55  }
56 
57  $ref_id = current($refs);
58 
59  $this->ctrl->setParameterByClass("ilObjBookingPoolGUI", "ref_id", $ref_id);
60  $this->ctrl->setParameterByClass("ilbookingobjectgui", "object_id", $res->getObjectId());
61 
62  // info file
63  if ($b_obj->getFile()) {
64  $this->has_files = true;
65  $link = $this->ctrl->getLinkTargetByClass(array("ilRepositoryGUI", "ilObjBookingPoolGUI", "ilbookingobjectgui"), "deliverInfo");
66 
67  $link = $this->ui->renderer()->render(
68  $this->ui->factory()->button()->shy($b_obj->getFile(), $link)
69  );
70 
71  $this->addInfoProperty($this->lng->txt("book_additional_info_file"), $link);
72  }
73 
74  // post file
75  $array_info = array();
76  if ($b_obj->getPostText()) {
77  $array_info[] = $b_obj->getPostText();
78  }
79  if ($b_obj->getPostFile()) {
80  $this->has_files = true;
81 
82  $link = $this->ctrl->getLinkTargetByClass(array("ilRepositoryGUI", "ilObjBookingPoolGUI", "ilbookingobjectgui"), "deliverPostFile");
83 
84  $array_info[] = $this->ui->renderer()->render(
85  $this->ui->factory()->button()->shy($b_obj->getPostFile(), $link)
86  );
87  }
88  if ($array_info) {
89  $this->addInfoProperty($this->lng->txt("book_post_booking_information"), implode("<br>", $array_info));
90  }
91  }
92 
93  $this->ctrl->setParameterByClass('ilcalendarappointmentgui', 'app_id', $a_app['event']->getEntryId());
94  $this->addAction(
95  $this->lng->txt("cal_ch_cancel_booking"),
96  $this->ctrl->getLinkTargetByClass('ilcalendarappointmentgui', 'cancelBooking')
97  );
98 
99  if (count($refs) > 0) {
100  $this->addAction($this->lng->txt("book_open"), ilLink::_getStaticLink(current($refs)));
101  }
102 
103  $this->addMetaData('book', $obj_id, "bobj", $res->getObjectId());
104  }
addInfoProperty($a_txt, $a_val)
Add info property.
a bookable ressource
getReadableRefIds($a_obj_id)
Get readable ref ids.
foreach($_POST as $key=> $value) $res
Create styles array
The data for the language used.
addMetaData($a_obj_type, $a_obj_id, $a_sub_obj_type=null, $a_sub_obj_id=null)
Add metadata.
+ Here is the call graph for this function:

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