ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilBookingProcessWithScheduleGUI Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Inheritance diagram for ilBookingProcessWithScheduleGUI:
+ Collaboration diagram for ilBookingProcessWithScheduleGUI:

Public Member Functions

 __construct (ilObjBookingPool $pool, int $booking_object_id, string $seed="", int $context_obj_id=0)
 
 executeCommand ()
 
 week ()
 First step in booking process. More...
 
 book ()
 Triggered from object list week view for booking a single object / confirmation for. More...
 
 assignParticipants ()
 
 showNumberForm ()
 
 processNumberForm ()
 
 checkAvailability (bool $incl_recurrence=true, int $nr=0, string $message="")
 
 displayPostInfo ()
 
 deliverPostFile ()
 
 back ()
 
 book ()
 
 assignParticipants ()
 
 displayPostInfo ()
 
 back ()
 

Protected Member Functions

 showNoPermission ()
 
 selectObjects ()
 
 getBookgingObjectTitle ()
 
 getNumberForm (int $from, int $to)
 
 getRecurrenceForm ()
 
 getMissingAvailabilityMessage (array $missing)
 
 bookAvailableItems (?int $recurrence=null, ?ilDateTime $until=null)
 
 getBookAvailableTarget (int $obj_id, string $slot, int $recurrence, int $nr, int $until)
 

Protected Attributes

ILIAS BookingManager Access AccessManager $access
 
ilLogger $log
 
ILIAS BookingManager BookingProcess ObjectSelectionManager $object_selection
 
ILIAS BookingManager Objects ObjectsManager $object_manager
 
ILIAS BookingManager Reservations ReservationManager $reservation
 
ILIAS BookingManager BookingProcess ProcessUtilGUI $util_gui
 
ILIAS BookingManager InternalRepoService $repo
 
ILIAS BookingManager BookingProcess BookingProcessManager $process
 
ILIAS HTTP Services $http
 
ILIAS BookingManager InternalGUIService $gui
 
array $raw_post_data
 
ILIAS BookingManager StandardGUIRequest $book_request
 
ilObjBookingPool $pool
 
int $booking_object_id
 
int $user_id_to_book
 
int $user_id_assigner
 
string $seed
 
ilBookingHelpAdapter $help
 
int $context_obj_id
 
ilCtrl $ctrl
 
ilGlobalTemplateInterface $tpl
 
ilLanguage $lng
 
ilTabsGUI $tabs_gui
 
ilObjUser $user
 
int $book_obj_id
 
array $rsv_ids = []
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Booking process ui class

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de

Definition at line 23 of file class.ilBookingProcessWithScheduleGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilBookingProcessWithScheduleGUI::__construct ( ilObjBookingPool  $pool,
int  $booking_object_id,
string  $seed = "",
int  $context_obj_id = 0 
)

Definition at line 52 of file class.ilBookingProcessWithScheduleGUI.php.

57 {
58 global $DIC;
59
60 $this->ctrl = $DIC->ctrl();
61 $this->tpl = $DIC["tpl"];
62 $this->lng = $DIC->language();
63 $this->tabs_gui = $DIC->tabs();
64 $this->user = $DIC->user();
65 $this->http = $DIC->http();
66
67 $this->context_obj_id = $context_obj_id;
68
69 $this->book_obj_id = $booking_object_id;
70
71 $this->pool = $pool;
72
73 $this->seed = $seed;
74 $internal_service = $DIC->bookingManager()->internal();
75 $this->gui = $internal_service->gui();
76 $domain = $internal_service->domain();
77 $this->book_request = $this->gui->standardRequest();
78 $this->help = $this->gui->bookingHelp($pool);
79 $this->log = $domain->log();
80
81 $this->repo = $internal_service->repo();
82
83 $this->object_manager = $domain->objects($pool->getId());
84 $this->object_selection = $domain->objectSelection($pool->getId());
85
86 $this->rsv_ids = $this->book_request->getReservationIdsFromString();
87
88 $this->raw_post_data = $DIC->http()->request()->getParsedBody();
89
90 $this->user_id_assigner = $this->user->getId();
91 if ($this->book_request->getBookedUser() > 0) {
92 $this->user_id_to_book = $this->book_request->getBookedUser();
93 } else {
94 $this->user_id_to_book = $this->user_id_assigner; // by default user books his own booking objects.
95 }
96 $this->ctrl->saveParameter($this, ["bkusr", "returnCmd"]);
97 $this->ctrl->setParameter($this, "seed", $this->seed);
98
99 $this->process = $DIC->bookingManager()->internal()->domain()->process();
100 $this->reservation = $DIC->bookingManager()->internal()->domain()->reservations();
101 $this->util_gui = $DIC->bookingManager()->internal()->gui()->process()->ProcessUtilGUI(
102 $this->pool,
103 $this
104 );
105 $this->access = $DIC->bookingManager()->internal()->domain()->access();
106 }
static http()
Fetches the global http state from ILIAS.
global $DIC
Definition: shib_login.php:26

References $booking_object_id, $context_obj_id, $DIC, $pool, $seed, $user_id_assigner, ILIAS\Repository\access(), ILIAS\Repository\ctrl(), ilObject\getId(), ILIAS\Repository\help(), ILIAS\FileDelivery\http(), ILIAS\Repository\lng(), and ILIAS\Repository\user().

+ Here is the call graph for this function:

Member Function Documentation

◆ assignParticipants()

ilBookingProcessWithScheduleGUI::assignParticipants ( )

Implements ILIAS\BookingManager\BookingProcess\BookingProcessGUI.

Definition at line 246 of file class.ilBookingProcessWithScheduleGUI.php.

246 : void
247 {
248 $this->util_gui->assignParticipants($this->book_obj_id);
249 }

◆ back()

ilBookingProcessWithScheduleGUI::back ( )

Implements ILIAS\BookingManager\BookingProcess\BookingProcessGUI.

Definition at line 549 of file class.ilBookingProcessWithScheduleGUI.php.

549 : void
550 {
551 $this->util_gui->back();
552 }

Referenced by showNoPermission().

+ Here is the caller graph for this function:

◆ book()

ilBookingProcessWithScheduleGUI::book ( )

Triggered from object list week view for booking a single object / confirmation for.

Implements ILIAS\BookingManager\BookingProcess\BookingProcessGUI.

Definition at line 208 of file class.ilBookingProcessWithScheduleGUI.php.

208 : void // ok
209 {
210 $this->log->debug("Step 1, book");
212
213 $this->tabs_gui->clearTargets();
214 $this->tabs_gui->setBackTarget($this->lng->txt('book_back_to_list'), $this->ctrl->getLinkTarget($this, 'back'));
215
216 $this->util_gui->setHelpId("book");
217
218 $obj = new ilBookingObject($this->book_obj_id);
219
220 $this->lng->loadLanguageModule("dateplaner");
221 $this->ctrl->setParameter($this, 'object_id', $obj->getId());
222 //$this->ctrl->setParameter($this, 'returnCmd', "book");
223
224 if ($this->user_id_to_book !== $this->user_id_assigner) {
225 $this->ctrl->setParameter($this, 'bkusr', $this->user_id_to_book);
226 }
227
228 if (!$this->access->canManageReservationForUser($this->book_request->getRefId(), $this->user_id_to_book)) {
229 return;
230 }
231
232 $user_settings = ilCalendarUserSettings::_getInstanceByUserId($this->user->getId());
233
234 $week_gui = new \ILIAS\BookingManager\BookingProcess\WeekGUI(
235 $this,
236 "book",
237 [$obj->getId()],
238 $this->pool->getId(),
239 $this->seed,
240 $user_settings->getWeekStart()
241 );
242 $tpl->setContent($week_gui->getHTML());
243 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _getInstanceByUserId(int $a_user_id)
setContent(string $a_html)
Sets content for standard template.

References $tpl, ilCalendarUserSettings\_getInstanceByUserId(), ILIAS\Repository\access(), ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), ILIAS\UICore\GlobalTemplate\setContent(), and ILIAS\Repository\user().

+ Here is the call graph for this function:

◆ bookAvailableItems()

ilBookingProcessWithScheduleGUI::bookAvailableItems ( ?int  $recurrence = null,
?ilDateTime  $until = null 
)
protected

Definition at line 474 of file class.ilBookingProcessWithScheduleGUI.php.

474 : void
475 {
476 if (!$this->access->canManageReservationForUser($this->pool->getRefId(), $this->user_id_to_book)) {
477 $this->showNoPermission();
478 return;
479 }
480 $this->log->debug("bookAvailableItems");
481 $obj_id = $this->book_request->getObjectId();
482 $from = $this->book_request->getSlotFrom();
483 $to = $this->book_request->getSlotTo();
484 $nr = $this->book_request->getNr();
485 $message = $this->pool->usesMessages()
486 ? $this->book_request->getMessage()
487 : "";
488 if (is_null($recurrence)) {
489 $recurrence = (int) $this->book_request->getRecurrence();
490 }
491 if (is_null($until)) {
492 if ($this->book_request->getUntil() > 0) {
493 $until = new ilDateTime($this->book_request->getUntil(), IL_CAL_UNIX);
494 }
495 }
496
497 $booked = $this->process->bookAvailableObjects(
498 $obj_id,
499 $this->user_id_to_book,
500 $this->user_id_assigner,
501 $this->context_obj_id,
502 $from,
503 $to,
504 $recurrence,
505 $nr,
506 $until,
508 );
509 if (count($booked) > 0) {
510 $this->util_gui->handleBookingSuccess($obj_id, "displayPostInfo", $booked);
511 } else {
512 $this->tpl->setOnScreenMessage('failure', $this->lng->txt('book_reservation_failed'), true);
513 $this->util_gui->back();
514 }
515 }
const IL_CAL_UNIX
@classDescription Date and time handling
$message
Definition: xapiexit.php:31

References $message, ILIAS\Repository\access(), IL_CAL_UNIX, ILIAS\Repository\int(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ checkAvailability()

ilBookingProcessWithScheduleGUI::checkAvailability ( bool  $incl_recurrence = true,
int  $nr = 0,
string  $message = "" 
)

Definition at line 384 of file class.ilBookingProcessWithScheduleGUI.php.

388 : void {
389 $this->log->debug("checkAvailability");
390 $obj_id = $this->book_request->getObjectId();
391 $from = $this->book_request->getSlotFrom();
392 $to = $this->book_request->getSlotTo();
393 if ($nr === 0) {
394 $nr = $this->book_request->getNr();
395 }
396 if ($message === "" && $this->pool->usesMessages()) {
397 $message = $this->book_request->getMessage();
398 }
399 $recurrence = 0;
400 $until_ts = 0;
401 if ($incl_recurrence) {
402 $form = $this->getRecurrenceForm();
403 // recurrence form not valid -> show again
404 if (!$form->isValid()) {
405 $this->gui->modal($this->getBookgingObjectTitle())
406 ->form($form)
407 ->send();
408 }
409
410 $recurrence = (int) $form->getData("recurrence"); // 1, 2 or 4
411 $until = $form->getData("until" . $recurrence);
412 $until_ts = $until->get(IL_CAL_UNIX);
413 }
414
415 $this->ctrl->saveParameter($this, ["object_id", "slot", "nr"]);
416 if ($this->pool->usesMessages()) {
417 $this->ctrl->setParameter(
418 $this,
419 "message",
420 rawurlencode($message)
421 );
422 }
423 $this->ctrl->setParameter($this, "recurrence", $recurrence);
424 $this->ctrl->setParameter($this, "until", $until_ts);
425 $book_available_target = $this->getBookAvailableTarget(
426 $obj_id,
427 $this->book_request->getSlot(),
428 $recurrence,
429 $nr,
430 $until_ts
431 );
432
433 if ($incl_recurrence) {
434
435 $missing = $this->process->getRecurrenceMissingAvailability(
436 $obj_id,
437 $from,
438 $to,
439 $recurrence,
440 $nr,
441 $until
442 );
443
444 // anything missing? -> send missing message
445 if (count($missing) > 0) {
446 $html = $this->getMissingAvailabilityMessage($missing);
447 $this->gui->modal($this->getBookgingObjectTitle())
448 ->legacy($html)
449 ->button(
450 $this->lng->txt("book_book_available"),
451 $book_available_target,
452 false
453 )
454 ->send();
455 }
456 }
457 $this->gui->send("<script>window.location.href = '" . $book_available_target . "';</script>");
458 }
getBookAvailableTarget(int $obj_id, string $slot, int $recurrence, int $nr, int $until)

◆ deliverPostFile()

ilBookingProcessWithScheduleGUI::deliverPostFile ( )

Definition at line 541 of file class.ilBookingProcessWithScheduleGUI.php.

541 : void
542 {
543 $this->util_gui->deliverPostFile(
544 $this->book_obj_id,
545 $this->user_id_assigner
546 );
547 }

◆ displayPostInfo()

ilBookingProcessWithScheduleGUI::displayPostInfo ( )

Implements ILIAS\BookingManager\BookingProcess\BookingProcessGUI.

Definition at line 532 of file class.ilBookingProcessWithScheduleGUI.php.

532 : void
533 {
534 $this->util_gui->displayPostInfo(
535 $this->book_obj_id,
536 $this->user_id_assigner,
537 "deliverPostFile"
538 );
539 }

◆ executeCommand()

ilBookingProcessWithScheduleGUI::executeCommand ( )

Definition at line 108 of file class.ilBookingProcessWithScheduleGUI.php.

108 : void
109 {
111
112 $next_class = $ctrl->getNextClass($this);
113 $cmd = $ctrl->getCmd("show");
114 switch ($next_class) {
115 default:
116 if (in_array($cmd, array("book", "back", "week",
117 "assignParticipants",
118 "bookMultipleParticipants",
119 "saveMultipleBookings",
120 "showNumberForm",
121 "processNumberForm",
122 "checkAvailability",
123 "displayPostInfo",
124 "bookAvailableItems",
125 "deliverPostFile",
126 "selectObjects",
127 "redirectToParticipantsList"
128 ))) {
129 $this->$cmd();
130 }
131 }
132 }
getNextClass($a_gui_class=null)
@inheritDoc
getCmd(?string $fallback_command=null)
@inheritDoc

References $ctrl, ilCtrl\getCmd(), and ilCtrl\getNextClass().

+ Here is the call graph for this function:

◆ getBookAvailableTarget()

ilBookingProcessWithScheduleGUI::getBookAvailableTarget ( int  $obj_id,
string  $slot,
int  $recurrence,
int  $nr,
int  $until 
)
protected

Definition at line 517 of file class.ilBookingProcessWithScheduleGUI.php.

523 : string {
524 $this->ctrl->setParameter($this, "obj_id", $obj_id);
525 $this->ctrl->setParameter($this, "slot", $slot);
526 $this->ctrl->setParameter($this, "recurrence", $recurrence);
527 $this->ctrl->setParameter($this, "nr", $nr);
528 $this->ctrl->setParameter($this, "until", $until);
529 return $this->ctrl->getLinkTarget($this, "bookAvailableItems");
530 }

◆ getBookgingObjectTitle()

ilBookingProcessWithScheduleGUI::getBookgingObjectTitle ( )
protected

Definition at line 268 of file class.ilBookingProcessWithScheduleGUI.php.

268 : string
269 {
270 return (new ilBookingObject($this->book_obj_id))->getTitle();
271 }

Referenced by showNumberForm().

+ Here is the caller graph for this function:

◆ getMissingAvailabilityMessage()

ilBookingProcessWithScheduleGUI::getMissingAvailabilityMessage ( array  $missing)
protected

Definition at line 460 of file class.ilBookingProcessWithScheduleGUI.php.

460 : string
461 {
462 $f = $this->gui->ui()->factory();
463 $box = $f->messageBox()->failure($this->lng->txt("book_missing_availability"));
464 $items = array_map(function ($i) {
465 $from = ilDatePresentation::formatDate(new ilDateTime($i["from"], IL_CAL_UNIX));
467 return $from . " - " . $to . " : " . str_replace("$1", $i["missing"], $this->lng->txt("book_missing_items"));
468 }, $missing);
469
470 $list = $f->listing()->unordered($items);
471 return $this->gui->ui()->renderer()->render([$box, $list]);
472 }
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false, ?ilObjUser $user=null,)

References Vendor\Package\$f, ilDatePresentation\formatDate(), IL_CAL_UNIX, and ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ getNumberForm()

ilBookingProcessWithScheduleGUI::getNumberForm ( int  $from,
int  $to 
)
protected
Exceptions
ilCtrlException
ilDateTimeException

Definition at line 278 of file class.ilBookingProcessWithScheduleGUI.php.

282 $counter = $this->reservation->getAvailableNr($this->book_request->getObjectId(), $from, $to);
284 new ilDateTime($from, IL_CAL_UNIX),
285 new ilDateTime($to, IL_CAL_UNIX)
286 );
287 $this->ctrl->setParameter($this, "slot", $from . "_" . $to);
288 $form = $this->gui->form([self::class], "processNumberForm")
289 ->asyncModal()
290 ->section(
291 "props",
292 $this->lng->txt("book_confirm_booking_schedule_number_of_objects"),
293 $this->lng->txt("book_confirm_booking_schedule_number_of_objects_info")
294 )
295 ->number("nr", $period, "", 1, 1, $counter)
296 ->radio("recurrence", $this->lng->txt("book_recurrence"), "", "0")
297 ->radioOption("0", $this->lng->txt("book_no_recurrence"))
298 ->radioOption("1", $this->lng->txt("book_book_recurrence"));
299 if ($this->pool->usesMessages()) {
300 $form = $form->textarea(
301 "message",
302 $this->lng->txt("book_message"),
303 $this->lng->txt("book_message_info")
304 );
305 }
306 return $form;
307 }
static formatPeriod(ilDateTime $start, ilDateTime $end, bool $a_skip_starting_day=false, ?ilObjUser $user=null)
Format a period of two dates Shows: 14.
$counter

Referenced by showNumberForm().

+ Here is the caller graph for this function:

◆ getRecurrenceForm()

ilBookingProcessWithScheduleGUI::getRecurrenceForm ( )
protected

Definition at line 363 of file class.ilBookingProcessWithScheduleGUI.php.

364 {
365 $this->lng->loadLanguageModule("dateplaner");
366 $today = new ilDate(time(), IL_CAL_UNIX);
367 $form = $this->gui->form([self::class], "checkAvailability")
368 ->section(
369 "props",
370 $this->lng->txt("book_confirm_booking_schedule_number_of_objects"),
371 $this->lng->txt("book_confirm_booking_schedule_number_of_objects_info")
372 )
373 ->switch("recurrence", $this->lng->txt("cal_recurrences"), "", "1")
374 ->group("1", $this->lng->txt("cal_weekly"))
375 ->date("until1", $this->lng->txt("cal_repeat_until"), "", $today)
376 ->group("2", $this->lng->txt("r_14"))
377 ->date("until2", $this->lng->txt("cal_repeat_until"), "", $today)
378 ->group("4", $this->lng->txt("r_4_weeks"))
379 ->date("until4", $this->lng->txt("cal_repeat_until"), "", $today)
380 ->end();
381 return $form;
382 }
Class for single dates.

References IL_CAL_UNIX, and ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ processNumberForm()

ilBookingProcessWithScheduleGUI::processNumberForm ( )

Definition at line 309 of file class.ilBookingProcessWithScheduleGUI.php.

309 : void
310 {
311 $this->log->debug("processNumberForm");
312 //get the user who will get the booking.
313 if ($this->book_request->getBookedUser() > 0) {
314 $this->user_id_to_book = $this->book_request->getBookedUser();
315 }
316 $slot = $this->book_request->getSlot();
317 $from = $this->book_request->getSlotFrom();
318 $to = $this->book_request->getSlotTo();
319 $obj_id = $this->book_request->getObjectId();
320
321 if ($this->user_id_assigner !== $this->user_id_to_book) {
322 $this->ctrl->setParameterByClass(self::class, "bkusr", $this->user_id_to_book);
323 }
324 $this->ctrl->setParameterByClass(self::class, "slot", $slot);
325
326 // form not valid -> show again
327 $form = $this->getNumberForm($from, $to);
328 if (!$form->isValid()) {
329 $this->gui->modal($this->getBookgingObjectTitle())
330 ->form($form)
331 ->send();
332 }
333
334 $message = $this->pool->usesMessages()
335 ? $form->getData("message")
336 : "";
337
338 // recurrence? -> show recurrence form
339 $recurrence = $form->getData("recurrence");
340 if ($recurrence === "1") {
341 if ($this->pool->usesMessages()) {
342 $this->ctrl->setParameterByClass(
343 self::class,
344 "message",
345 rawurlencode($message)
346 );
347 }
348 $this->ctrl->setParameterByClass(self::class, "object_id", $this->book_request->getObjectId());
349 $this->ctrl->setParameterByClass(self::class, "nr", (int) $form->getData("nr"));
350 $form = $this->getRecurrenceForm();
351 $this->gui->modal($this->getBookgingObjectTitle())
352 ->form($form)
353 ->send();
354 }
355 $this->checkAvailability(
356 false,
357 $form->getData("nr"),
359 );
360 }
checkAvailability(bool $incl_recurrence=true, int $nr=0, string $message="")

References $message, and ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ selectObjects()

ilBookingProcessWithScheduleGUI::selectObjects ( )
protected

Definition at line 189 of file class.ilBookingProcessWithScheduleGUI.php.

189 : void
190 {
191 $this->log->debug("selectObjects");
192 $obj_ids = $this->book_request->getObjectIds();
193 $this->object_selection->setSelectedObjects($obj_ids);
194 $this->ctrl->redirect($this, "week");
195 }

References ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ showNoPermission()

ilBookingProcessWithScheduleGUI::showNoPermission ( )
protected

Definition at line 134 of file class.ilBookingProcessWithScheduleGUI.php.

134 : void
135 {
136 $this->tpl->setOnScreenMessage('failure', $this->lng->txt("no_permission"), true);
137 $this->back();
138 }

References back(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ showNumberForm()

ilBookingProcessWithScheduleGUI::showNumberForm ( )

Definition at line 251 of file class.ilBookingProcessWithScheduleGUI.php.

251 : void
252 {
253 $this->log->debug("showNumberForm");
254 $object_id = $this->book_obj_id;
255 $from = $this->book_request->getSlotFrom();
256 $to = $this->book_request->getSlotTo() - 1;
257 $this->tabs_gui->clearTargets();
258 $this->tabs_gui->setBackTarget(
259 $this->lng->txt('book_back_to_list'),
260 $this->ctrl->getLinkTarget($this, 'back')
261 );
262 $form = $this->getNumberForm($from, $to);
263 $this->gui->modal($this->getBookgingObjectTitle())
264 ->form($form)
265 ->send();
266 }

References $book_obj_id, getBookgingObjectTitle(), getNumberForm(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ week()

ilBookingProcessWithScheduleGUI::week ( )

First step in booking process.

Definition at line 147 of file class.ilBookingProcessWithScheduleGUI.php.

147 : void // ok
148 {
150 $this->log->debug("Step 0, week");
151
152 //$this->tabs_gui->clearTargets();
153 //$this->tabs_gui->setBackTarget($this->lng->txt('book_back_to_list'), $this->ctrl->getLinkTarget($this, 'back'));
154
155 $this->util_gui->setHelpId("week");
156 $this->ctrl->setParameter($this, 'returnCmd', "week");
157
158 if ($this->user_id_to_book !== $this->user_id_assigner) {
159 $this->ctrl->setParameter($this, 'bkusr', $this->user_id_to_book);
160 }
161 $user_settings = ilCalendarUserSettings::_getInstanceByUserId($this->user->getId());
162
163 $week_gui = new \ILIAS\BookingManager\BookingProcess\WeekGUI(
164 $this,
165 "week",
166 $this->object_selection->getSelectedObjects(),
167 $this->pool->getId(),
168 $this->seed,
169 $user_settings->getWeekStart()
170 );
171 $tpl->setContent($week_gui->getHTML());
172
173 $bar = $this->gui->toolbar();
174 $list_link = $this->ctrl->getLinkTargetByClass("ilObjBookingPoolGUI", "render");
175 $week_link = $this->ctrl->getLinkTargetByClass("ilBookingProcessWithScheduleGUI", "week");
176 $mode_control = $this->gui->ui()->factory()->viewControl()->mode([
177 $this->lng->txt("book_list") => $list_link,
178 $this->lng->txt("book_week") => $week_link
179 ], $this->lng->txt("book_view"))->withActive($this->lng->txt("book_week"));
180 $bar->addComponent($mode_control);
181
182 $list_gui = new \ILIAS\BookingManager\BookingProcess\ObjectSelectionListGUI(
183 $this->pool->getId(),
184 $this->ctrl->getFormAction($this, "selectObjects")
185 );
186 $tpl->setRightContent($list_gui->render());
187 }
setRightContent(string $a_html)
Sets content of right column.

References Vendor\Package\$bar, $tpl, ilCalendarUserSettings\_getInstanceByUserId(), ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), ILIAS\UICore\GlobalTemplate\setContent(), ILIAS\UICore\GlobalTemplate\setRightContent(), and ILIAS\Repository\user().

+ Here is the call graph for this function:

Field Documentation

◆ $access

ILIAS BookingManager Access AccessManager ilBookingProcessWithScheduleGUI::$access
protected

Definition at line 25 of file class.ilBookingProcessWithScheduleGUI.php.

◆ $book_obj_id

int ilBookingProcessWithScheduleGUI::$book_obj_id
protected

Definition at line 49 of file class.ilBookingProcessWithScheduleGUI.php.

Referenced by showNumberForm().

◆ $book_request

ILIAS BookingManager StandardGUIRequest ilBookingProcessWithScheduleGUI::$book_request
protected

Definition at line 36 of file class.ilBookingProcessWithScheduleGUI.php.

◆ $booking_object_id

int ilBookingProcessWithScheduleGUI::$booking_object_id
protected

Definition at line 38 of file class.ilBookingProcessWithScheduleGUI.php.

Referenced by __construct().

◆ $context_obj_id

int ilBookingProcessWithScheduleGUI::$context_obj_id
protected

Definition at line 43 of file class.ilBookingProcessWithScheduleGUI.php.

Referenced by __construct().

◆ $ctrl

ilCtrl ilBookingProcessWithScheduleGUI::$ctrl
protected

Definition at line 44 of file class.ilBookingProcessWithScheduleGUI.php.

Referenced by executeCommand().

◆ $gui

ILIAS BookingManager InternalGUIService ilBookingProcessWithScheduleGUI::$gui
protected

Definition at line 34 of file class.ilBookingProcessWithScheduleGUI.php.

◆ $help

ilBookingHelpAdapter ilBookingProcessWithScheduleGUI::$help
protected

Definition at line 42 of file class.ilBookingProcessWithScheduleGUI.php.

◆ $http

ILIAS HTTP Services ilBookingProcessWithScheduleGUI::$http
protected

Definition at line 33 of file class.ilBookingProcessWithScheduleGUI.php.

◆ $lng

ilLanguage ilBookingProcessWithScheduleGUI::$lng
protected

Definition at line 46 of file class.ilBookingProcessWithScheduleGUI.php.

◆ $log

ilLogger ilBookingProcessWithScheduleGUI::$log
protected

Definition at line 26 of file class.ilBookingProcessWithScheduleGUI.php.

◆ $object_manager

ILIAS BookingManager Objects ObjectsManager ilBookingProcessWithScheduleGUI::$object_manager
protected

Definition at line 28 of file class.ilBookingProcessWithScheduleGUI.php.

◆ $object_selection

ILIAS BookingManager BookingProcess ObjectSelectionManager ilBookingProcessWithScheduleGUI::$object_selection
protected

Definition at line 27 of file class.ilBookingProcessWithScheduleGUI.php.

◆ $pool

ilObjBookingPool ilBookingProcessWithScheduleGUI::$pool
protected

Definition at line 37 of file class.ilBookingProcessWithScheduleGUI.php.

Referenced by __construct().

◆ $process

ILIAS BookingManager BookingProcess BookingProcessManager ilBookingProcessWithScheduleGUI::$process
protected

Definition at line 32 of file class.ilBookingProcessWithScheduleGUI.php.

◆ $raw_post_data

array ilBookingProcessWithScheduleGUI::$raw_post_data
protected

Definition at line 35 of file class.ilBookingProcessWithScheduleGUI.php.

◆ $repo

ILIAS BookingManager InternalRepoService ilBookingProcessWithScheduleGUI::$repo
protected

Definition at line 31 of file class.ilBookingProcessWithScheduleGUI.php.

◆ $reservation

ILIAS BookingManager Reservations ReservationManager ilBookingProcessWithScheduleGUI::$reservation
protected

Definition at line 29 of file class.ilBookingProcessWithScheduleGUI.php.

◆ $rsv_ids

array ilBookingProcessWithScheduleGUI::$rsv_ids = []
protected

Definition at line 50 of file class.ilBookingProcessWithScheduleGUI.php.

◆ $seed

string ilBookingProcessWithScheduleGUI::$seed
protected

Definition at line 41 of file class.ilBookingProcessWithScheduleGUI.php.

Referenced by __construct().

◆ $tabs_gui

ilTabsGUI ilBookingProcessWithScheduleGUI::$tabs_gui
protected

Definition at line 47 of file class.ilBookingProcessWithScheduleGUI.php.

◆ $tpl

ilGlobalTemplateInterface ilBookingProcessWithScheduleGUI::$tpl
protected

Definition at line 45 of file class.ilBookingProcessWithScheduleGUI.php.

Referenced by book(), and week().

◆ $user

ilObjUser ilBookingProcessWithScheduleGUI::$user
protected

Definition at line 48 of file class.ilBookingProcessWithScheduleGUI.php.

◆ $user_id_assigner

int ilBookingProcessWithScheduleGUI::$user_id_assigner
protected

Definition at line 40 of file class.ilBookingProcessWithScheduleGUI.php.

Referenced by __construct().

◆ $user_id_to_book

int ilBookingProcessWithScheduleGUI::$user_id_to_book
protected

Definition at line 39 of file class.ilBookingProcessWithScheduleGUI.php.

◆ $util_gui

ILIAS BookingManager BookingProcess ProcessUtilGUI ilBookingProcessWithScheduleGUI::$util_gui
protected

Definition at line 30 of file class.ilBookingProcessWithScheduleGUI.php.


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