ILIAS  trunk Revision v11.0_alpha-1749-g1a06bdef097
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator 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 28 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().

28  : void
29  {
30  $a_app = $this->appointment;
31  $cat_info = $this->getCatInfo();
32 
33  $this->lng->loadLanguageModule("book");
34 
35  // context id is reservation id (see ilObjBookingPoolGUI->processBooking)
36  $res_id = $a_app['event']->getContextId();
37  $res = new ilBookingReservation($res_id);
38  $b_obj = new ilBookingObject($res->getObjectId());
39  $obj_id = $b_obj->getPoolId();
40 
41  $refs = $this->getReadableRefIds($obj_id);
42 
43  // add common section (title, description, object/calendar, location)
44  //$this->addCommonSection($a_app, $obj_id, $cat_info);
45 
46  if (count($refs) > 0) {
47  $this->addInfoSection($b_obj->getTitle());
48 
49  // object description
50  if ($b_obj->getDescription()) {
51  $this->addInfoProperty($this->lng->txt("description"), $b_obj->getDescription());
52  }
53 
54  $this->addObjectLinks($obj_id, $this->appointment);
55 
56  //object info (course, grp...)
57  //$this->addContainerInfo($obj_id);
58 
59  //link to personal bookings
60  $this->addCalendarInfo($cat_info);
61 
62  // section: booking information
63  if ($b_obj->getDescription() || $b_obj->getFile()) {
64  $this->addInfoSection($this->lng->txt("book_booking_information"));
65  }
66 
67  $ref_id = current($refs);
68 
69  $this->ctrl->setParameterByClass("ilObjBookingPoolGUI", "ref_id", $ref_id);
70  $this->ctrl->setParameterByClass("ilbookingobjectgui", "object_id", $res->getObjectId());
71 
72  // info file
73  if ($b_obj->getFile()) {
74  $this->has_files = true;
75  $link = $this->ctrl->getLinkTargetByClass(array("ilRepositoryGUI",
76  "ilObjBookingPoolGUI",
77  "ilbookingobjectgui"
78  ), "deliverInfo");
79 
80  $link = $this->ui->renderer()->render(
81  $this->ui->factory()->button()->shy($b_obj->getFile(), $link)
82  );
83 
84  $this->addInfoProperty($this->lng->txt("book_additional_info_file"), $link);
85  }
86 
87  // post file
88  $array_info = array();
89  if (($text = $b_obj->getPostText()) != "") {
91  $a_app['event']->getStart(),
92  $a_app['event']->getEnd()
93  );
94  $text = str_replace("[OBJECT]", $b_obj->getTitle(), $text);
95  $text = str_replace("[PERIOD]", $period, $text);
96  $array_info[] = $text;
97  }
98  if ($b_obj->getPostFile()) {
99  $this->has_files = true;
100 
101  $link = $this->ctrl->getLinkTargetByClass(array("ilRepositoryGUI",
102  "ilObjBookingPoolGUI",
103  "ilbookingobjectgui",
104  "ilBookingProcessGUI"
105  ), "deliverPostFile");
106 
107  $array_info[] = $this->ui->renderer()->render(
108  $this->ui->factory()->button()->shy($b_obj->getPostFile(), $link)
109  );
110  }
111  if ($array_info) {
112  $this->addInfoProperty($this->lng->txt("book_post_booking_information"), implode("<br>", $array_info));
113  }
114  }
115 
116  $this->ctrl->setParameterByClass('ilcalendarappointmentgui', 'app_id', $a_app['event']->getEntryId());
117  $this->addAction(
118  $this->lng->txt("cal_ch_cancel_booking"),
119  $this->ctrl->getLinkTargetByClass('ilcalendarappointmentgui', 'cancelBooking')
120  );
121 
122  if (count($refs) > 0) {
123  $this->addAction($this->lng->txt("book_open"), ilLink::_getStaticLink(current($refs)));
124  }
125 
126  $this->addMetaData('book', $obj_id, "bobj", $res->getObjectId());
127  }
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
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: