ILIAS  trunk Revision v12.0_alpha-1221-g4e438232683
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 = []
 
string $origin_cmd = null
 

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 53 of file class.ilBookingProcessWithScheduleGUI.php.

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

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

◆ back()

ilBookingProcessWithScheduleGUI::back ( )

Implements ILIAS\BookingManager\BookingProcess\BookingProcessGUI.

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

559 : void
560 {
561 $this->util_gui->back();
562 }

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 209 of file class.ilBookingProcessWithScheduleGUI.php.

209 : void // ok
210 {
211 $this->log->debug("Step 1, book");
213
214 $this->tabs_gui->clearTargets();
215 $this->tabs_gui->setBackTarget($this->lng->txt('book_back_to_list'), $this->ctrl->getLinkTarget($this, 'back'));
216
217 $this->util_gui->setHelpId("book");
218
219 $obj = new ilBookingObject($this->book_obj_id);
220
221 $this->lng->loadLanguageModule("dateplaner");
222 $this->ctrl->setParameter($this, 'object_id', $obj->getId());
223 $this->ctrl->setParameter($this, 'returnCmd', 'week');
224
225 if ($this->user_id_to_book !== $this->user_id_assigner) {
226 $this->ctrl->setParameter($this, 'bkusr', $this->user_id_to_book);
227 }
228
229 if (!$this->access->canManageReservationForUser($this->book_request->getRefId(), $this->user_id_to_book)) {
230 return;
231 }
232
233 $user_settings = ilCalendarUserSettings::_getInstanceByUserId($this->user->getId());
234
235 $week_gui = new \ILIAS\BookingManager\BookingProcess\WeekGUI(
236 $this,
237 "book",
238 [$obj->getId()],
239 $this->pool->getId(),
240 $this->seed,
241 $user_settings->getWeekStart()
242 );
243 $tpl->setContent($week_gui->getHTML());
244 }
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 481 of file class.ilBookingProcessWithScheduleGUI.php.

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

References 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 391 of file class.ilBookingProcessWithScheduleGUI.php.

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

◆ deliverPostFile()

ilBookingProcessWithScheduleGUI::deliverPostFile ( )

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

551 : void
552 {
553 $this->util_gui->deliverPostFile(
554 $this->book_obj_id,
555 $this->user_id_assigner
556 );
557 }

◆ displayPostInfo()

ilBookingProcessWithScheduleGUI::displayPostInfo ( )

Implements ILIAS\BookingManager\BookingProcess\BookingProcessGUI.

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

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

◆ executeCommand()

ilBookingProcessWithScheduleGUI::executeCommand ( )

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

109 : void
110 {
112
113 $next_class = $ctrl->getNextClass($this);
114 $cmd = $ctrl->getCmd("show");
115 switch ($next_class) {
116 default:
117 if (in_array($cmd, array("book", "back", "week",
118 "assignParticipants",
119 "bookMultipleParticipants",
120 "saveMultipleBookings",
121 "showNumberForm",
122 "processNumberForm",
123 "checkAvailability",
124 "displayPostInfo",
125 "bookAvailableItems",
126 "deliverPostFile",
127 "selectObjects",
128 "redirectToParticipantsList"
129 ))) {
130 $this->$cmd();
131 }
132 }
133 }
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 524 of file class.ilBookingProcessWithScheduleGUI.php.

530 : string {
531 $this->ctrl->setParameter($this, "obj_id", $obj_id);
532 $this->ctrl->setParameter($this, "slot", $slot);
533 $this->ctrl->setParameter($this, "recurrence", $recurrence);
534 $this->ctrl->setParameter($this, "nr", $nr);
535 $this->ctrl->setParameter($this, "until", $until);
536 if (is_string($this->origin_cmd) && $this->origin_cmd !== "") {
537 $this->ctrl->setParameter($this, "origin_cmd", $this->origin_cmd);
538 }
539 return $this->ctrl->getLinkTarget($this, "bookAvailableItems");
540 }

References ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ getBookgingObjectTitle()

ilBookingProcessWithScheduleGUI::getBookgingObjectTitle ( )
protected

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

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

Referenced by showNumberForm().

+ Here is the caller graph for this function:

◆ getMissingAvailabilityMessage()

ilBookingProcessWithScheduleGUI::getMissingAvailabilityMessage ( array  $missing)
protected

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

467 : string
468 {
469 $f = $this->gui->ui()->factory();
470 $box = $f->messageBox()->failure($this->lng->txt("book_missing_availability"));
471 $items = array_map(function ($i) {
472 $from = ilDatePresentation::formatDate(new ilDateTime($i["from"], IL_CAL_UNIX));
474 return $from . " - " . $to . " : " . str_replace("$1", $i["missing"], $this->lng->txt("book_missing_items"));
475 }, $missing);
476
477 $list = $f->listing()->unordered($items);
478 return $this->gui->ui()->renderer()->render([$box, $list]);
479 }
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 279 of file class.ilBookingProcessWithScheduleGUI.php.

283 $counter = $this->reservation->getAvailableNr($this->book_request->getObjectId(), $from, $to);
285 new ilDateTime($from, IL_CAL_UNIX),
286 new ilDateTime($to, IL_CAL_UNIX)
287 );
288 $this->ctrl->setParameter($this, "slot", $from . "_" . $to);
289 $form = $this->gui->form([self::class], "processNumberForm")
290 ->asyncModal()
291 ->section(
292 "props",
293 $this->lng->txt("book_confirm_booking_schedule_number_of_objects"),
294 $this->lng->txt("book_confirm_booking_schedule_number_of_objects_info")
295 )
296 ->number("nr", $period, "", 1, 1, $counter)
297 ->radio("recurrence", $this->lng->txt("book_recurrence"), "", "0")
298 ->radioOption("0", $this->lng->txt("book_no_recurrence"))
299 ->radioOption("1", $this->lng->txt("book_book_recurrence"))
300 ->hidden("origin_cmd", $this->book_request->getOriginCmd());
301 if ($this->pool->usesMessages()) {
302 $form = $form->textarea(
303 "message",
304 $this->lng->txt("book_message"),
305 $this->lng->txt("book_message_info")
306 );
307 }
308 return $form;
309 }
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 370 of file class.ilBookingProcessWithScheduleGUI.php.

371 {
372 $this->lng->loadLanguageModule("dateplaner");
373 $today = new ilDate(time(), IL_CAL_UNIX);
374 $form = $this->gui->form([self::class], "checkAvailability")
375 ->section(
376 "props",
377 $this->lng->txt("book_confirm_booking_schedule_number_of_objects"),
378 $this->lng->txt("book_confirm_booking_schedule_number_of_objects_info")
379 )
380 ->switch("recurrence", $this->lng->txt("cal_recurrences"), "", "1")
381 ->group("1", $this->lng->txt("cal_weekly"))
382 ->date("until1", $this->lng->txt("cal_repeat_until"), "", $today)
383 ->group("2", $this->lng->txt("r_14"))
384 ->date("until2", $this->lng->txt("cal_repeat_until"), "", $today)
385 ->group("4", $this->lng->txt("r_4_weeks"))
386 ->date("until4", $this->lng->txt("cal_repeat_until"), "", $today)
387 ->end();
388 return $form;
389 }
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 311 of file class.ilBookingProcessWithScheduleGUI.php.

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

References ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ selectObjects()

ilBookingProcessWithScheduleGUI::selectObjects ( )
protected

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

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

References ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ showNoPermission()

ilBookingProcessWithScheduleGUI::showNoPermission ( )
protected

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

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

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

+ Here is the call graph for this function:

◆ showNumberForm()

ilBookingProcessWithScheduleGUI::showNumberForm ( )

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

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

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 148 of file class.ilBookingProcessWithScheduleGUI.php.

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

◆ $origin_cmd

string ilBookingProcessWithScheduleGUI::$origin_cmd = null
protected

Definition at line 51 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: