ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
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 ($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, $a_appointment=null)
 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...
 
 buildDirectLinkForAppointment ($a_ref_id, $a_appointment=null)
 Build direct link 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(), ilAppointmentPresentationGUI\getCatInfo(), ilAppointmentPresentationGUI\getReadableRefIds(), and ui().

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  $res = new ilBookingReservation($res_id);
26  $b_obj = new ilBookingObject($res->getObjectId());
27  $obj_id = $b_obj->getPoolId();
28 
29  $refs = $this->getReadableRefIds($obj_id);
30 
31  // add common section (title, description, object/calendar, location)
32  //$this->addCommonSection($a_app, $obj_id, $cat_info);
33 
34  if (count($refs) > 0) {
35  $this->addInfoSection($b_obj->getTitle());
36 
37  // object description
38  if ($b_obj->getDescription()) {
39  $this->addInfoProperty($this->lng->txt("description"), $b_obj->getDescription());
40  }
41 
42  $this->addObjectLinks($obj_id, $this->appointment);
43 
44  //object info (course, grp...)
45  //$this->addContainerInfo($obj_id);
46 
47  //link to personal bookings
48  $this->addCalendarInfo($cat_info);
49 
50  // section: booking information
51  if ($b_obj->getDescription() || $b_obj->getFile()) {
52  $this->addInfoSection($this->lng->txt("book_booking_information"));
53  }
54 
55  $ref_id = current($refs);
56 
57  $this->ctrl->setParameterByClass("ilObjBookingPoolGUI", "ref_id", $ref_id);
58  $this->ctrl->setParameterByClass("ilbookingobjectgui", "object_id", $res->getObjectId());
59 
60  // info file
61  if ($b_obj->getFile()) {
62  $this->has_files = true;
63  $link = $this->ctrl->getLinkTargetByClass(array("ilRepositoryGUI", "ilObjBookingPoolGUI", "ilbookingobjectgui"), "deliverInfo");
64 
65  $link = $this->ui->renderer()->render(
66  $this->ui->factory()->button()->shy($b_obj->getFile(), $link)
67  );
68 
69  $this->addInfoProperty($this->lng->txt("book_additional_info_file"), $link);
70  }
71 
72  // post file
73  $array_info = array();
74  if ($b_obj->getPostText()) {
75  $array_info[] = $b_obj->getPostText();
76  }
77  if ($b_obj->getPostFile()) {
78  $this->has_files = true;
79 
80  $link = $this->ctrl->getLinkTargetByClass(array("ilRepositoryGUI", "ilObjBookingPoolGUI", "ilbookingobjectgui"), "deliverPostFile");
81 
82  $array_info[] = $this->ui->renderer()->render(
83  $this->ui->factory()->button()->shy($b_obj->getPostFile(), $link)
84  );
85  }
86  if ($array_info) {
87  $this->addInfoProperty($this->lng->txt("book_post_booking_information"), implode("<br>", $array_info));
88  }
89  }
90 
91  $this->ctrl->setParameterByClass('ilcalendarappointmentgui', 'app_id', $a_app['event']->getEntryId());
92  $this->addAction(
93  $this->lng->txt("cal_ch_cancel_booking"),
94  $this->ctrl->getLinkTargetByClass('ilcalendarappointmentgui', 'cancelBooking')
95  );
96 
97  if (count($refs) > 0) {
98  $this->addAction($this->lng->txt("book_open"), ilLink::_getStaticLink(current($refs)));
99  }
100 
101  $this->addMetaData('book', $obj_id, "bobj", $res->getObjectId());
102  }
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
ui()
Definition: ui.php:5
addMetaData($a_obj_type, $a_obj_id, $a_sub_obj_type=null, $a_sub_obj_id=null)
Add metadata.
addObjectLinks($obj_id, $a_appointment=null)
Add object link.
+ Here is the call graph for this function:

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