ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
ilBookingProcessWithScheduleGUI Class Reference

Booking process ui class. 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 ()
 

Protected Member Functions

 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

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
 
ilAccessHandler $access
 
ilTabsGUI $tabs_gui
 
ilObjUser $user
 
int $book_obj_id
 
array $rsv_ids = []
 

Detailed Description

Booking process ui class.

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

Definition at line 25 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 54 of file class.ilBookingProcessWithScheduleGUI.php.

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().

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

Member Function Documentation

◆ assignParticipants()

ilBookingProcessWithScheduleGUI::assignParticipants ( )

Implements ILIAS\BookingManager\BookingProcess\BookingProcessGUI.

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

239  : void
240  {
241  $this->util_gui->assignParticipants($this->book_obj_id);
242  }

◆ back()

ilBookingProcessWithScheduleGUI::back ( )

Implements ILIAS\BookingManager\BookingProcess\BookingProcessGUI.

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

538  : void
539  {
540  $this->util_gui->back();
541  }

◆ book()

ilBookingProcessWithScheduleGUI::book ( )

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

Implements ILIAS\BookingManager\BookingProcess\BookingProcessGUI.

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

References $seed, $tpl, ilCalendarUserSettings\_getInstanceByUserId(), ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), ilGlobalTemplateInterface\setContent(), and ILIAS\Repository\user().

205  : void // ok
206  {
207  $this->log->debug("Step 1, book");
208  $tpl = $this->tpl;
209 
210  $this->tabs_gui->clearTargets();
211  $this->tabs_gui->setBackTarget($this->lng->txt('book_back_to_list'), $this->ctrl->getLinkTarget($this, 'back'));
212 
213  $this->util_gui->setHelpId("book");
214 
215  $obj = new ilBookingObject($this->book_obj_id);
216 
217  $this->lng->loadLanguageModule("dateplaner");
218  $this->ctrl->setParameter($this, 'object_id', $obj->getId());
219  //$this->ctrl->setParameter($this, 'returnCmd', "book");
220 
221  if ($this->user_id_to_book !== $this->user_id_assigner) {
222  $this->ctrl->setParameter($this, 'bkusr', $this->user_id_to_book);
223  }
224 
225  $user_settings = ilCalendarUserSettings::_getInstanceByUserId($this->user->getId());
226 
227  $week_gui = new \ILIAS\BookingManager\BookingProcess\WeekGUI(
228  $this,
229  "book",
230  [$obj->getId()],
231  $this->pool->getId(),
232  $this->seed,
233  $user_settings->getWeekStart()
234  );
235  $tpl->setContent($week_gui->getHTML());
236  }
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.
+ Here is the call graph for this function:

◆ bookAvailableItems()

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

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

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

467  : void
468  {
469  $this->log->debug("bookAvailableItems");
470  $obj_id = $this->book_request->getObjectId();
471  $from = $this->book_request->getSlotFrom();
472  $to = $this->book_request->getSlotTo();
473  $nr = $this->book_request->getNr();
474  $message = $this->pool->usesMessages()
475  ? $this->book_request->getMessage()
476  : "";
477  if (is_null($recurrence)) {
478  $recurrence = (int) $this->book_request->getRecurrence();
479  }
480  if (is_null($until)) {
481  if ($this->book_request->getUntil() > 0) {
482  $until = new ilDateTime($this->book_request->getUntil(), IL_CAL_UNIX);
483  }
484  }
485 
486  $booked = $this->process->bookAvailableObjects(
487  $obj_id,
488  $this->user_id_to_book,
489  $this->user_id_assigner,
490  $this->context_obj_id,
491  $from,
492  $to,
493  $recurrence,
494  $nr,
495  $until,
496  $message
497  );
498  if (count($booked) > 0) {
499  $this->util_gui->handleBookingSuccess($obj_id, "displayPostInfo", $booked);
500  } else {
501  $this->tpl->setOnScreenMessage('failure', $this->lng->txt('book_reservation_failed'), true);
502  $this->util_gui->back();
503  }
504  }
const IL_CAL_UNIX
$message
Definition: xapiexit.php:32
+ Here is the call graph for this function:

◆ checkAvailability()

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

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

References $message, ILIAS\Repository\ctrl(), getBookAvailableTarget(), getBookgingObjectTitle(), getMissingAvailabilityMessage(), getRecurrenceForm(), IL_CAL_UNIX, ILIAS\Repository\int(), ILIAS\Repository\lng(), and send().

Referenced by processNumberForm().

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

◆ deliverPostFile()

ilBookingProcessWithScheduleGUI::deliverPostFile ( )

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

530  : void
531  {
532  $this->util_gui->deliverPostFile(
533  $this->book_obj_id,
534  $this->user_id_assigner
535  );
536  }

◆ displayPostInfo()

ilBookingProcessWithScheduleGUI::displayPostInfo ( )

Implements ILIAS\BookingManager\BookingProcess\BookingProcessGUI.

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

521  : void
522  {
523  $this->util_gui->displayPostInfo(
524  $this->book_obj_id,
525  $this->user_id_assigner,
526  "deliverPostFile"
527  );
528  }

◆ executeCommand()

ilBookingProcessWithScheduleGUI::executeCommand ( )

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

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

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

References ILIAS\Repository\ctrl().

Referenced by checkAvailability().

512  : string {
513  $this->ctrl->setParameter($this, "obj_id", $obj_id);
514  $this->ctrl->setParameter($this, "slot", $slot);
515  $this->ctrl->setParameter($this, "recurrence", $recurrence);
516  $this->ctrl->setParameter($this, "nr", $nr);
517  $this->ctrl->setParameter($this, "until", $until);
518  return $this->ctrl->getLinkTarget($this, "bookAvailableItems");
519  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getBookgingObjectTitle()

ilBookingProcessWithScheduleGUI::getBookgingObjectTitle ( )
protected

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

Referenced by checkAvailability(), processNumberForm(), and showNumberForm().

261  : string
262  {
263  return (new ilBookingObject($this->book_obj_id))->getTitle();
264  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the caller graph for this function:

◆ getMissingAvailabilityMessage()

ilBookingProcessWithScheduleGUI::getMissingAvailabilityMessage ( array  $missing)
protected

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

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

Referenced by checkAvailability().

453  : string
454  {
455  $f = $this->gui->ui()->factory();
456  $box = $f->messageBox()->failure($this->lng->txt("book_missing_availability"));
457  $items = array_map(function ($i) {
458  $from = ilDatePresentation::formatDate(new ilDateTime($i["from"], IL_CAL_UNIX));
460  return $from . " - " . $to . " : " . str_replace("$1", $i["missing"], $this->lng->txt("book_missing_items"));
461  }, $missing);
462 
463  $list = $f->listing()->unordered($items);
464  return $this->gui->ui()->renderer()->render([$box, $list]);
465  }
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false)
const IL_CAL_UNIX
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getNumberForm()

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

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

References ILIAS\Repository\ctrl(), ilDatePresentation\formatPeriod(), IL_CAL_UNIX, and ILIAS\Repository\lng().

Referenced by processNumberForm(), and showNumberForm().

275  $counter = $this->reservation->getAvailableNr($this->book_request->getObjectId(), $from, $to);
277  new ilDateTime($from, IL_CAL_UNIX),
278  new ilDateTime($to, IL_CAL_UNIX)
279  );
280  $this->ctrl->setParameter($this, "slot", $from . "_" . $to);
281  $form = $this->gui->form([self::class], "processNumberForm")
282  ->asyncModal()
283  ->section(
284  "props",
285  $this->lng->txt("book_confirm_booking_schedule_number_of_objects"),
286  $this->lng->txt("book_confirm_booking_schedule_number_of_objects_info")
287  )
288  ->number("nr", $period, "", 1, 1, $counter)
289  ->radio("recurrence", $this->lng->txt("book_recurrence"), "", "0")
290  ->radioOption("0", $this->lng->txt("book_no_recurrence"))
291  ->radioOption("1", $this->lng->txt("book_book_recurrence"));
292  if ($this->pool->usesMessages()) {
293  $form = $form->textarea(
294  "message",
295  $this->lng->txt("book_message"),
296  $this->lng->txt("book_message_info")
297  );
298  }
299  return $form;
300  }
const IL_CAL_UNIX
static formatPeriod(ilDateTime $start, ilDateTime $end, bool $a_skip_starting_day=false)
Format a period of two dates Shows: 14.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getRecurrenceForm()

ilBookingProcessWithScheduleGUI::getRecurrenceForm ( )
protected

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

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

Referenced by checkAvailability(), and processNumberForm().

357  {
358  $this->lng->loadLanguageModule("dateplaner");
359  $today = new ilDate(time(), IL_CAL_UNIX);
360  $form = $this->gui->form([self::class], "checkAvailability")
361  ->section(
362  "props",
363  $this->lng->txt("book_confirm_booking_schedule_number_of_objects"),
364  $this->lng->txt("book_confirm_booking_schedule_number_of_objects_info")
365  )
366  ->switch("recurrence", $this->lng->txt("cal_recurrences"), "", "1")
367  ->group("1", $this->lng->txt("cal_weekly"))
368  ->date("until1", $this->lng->txt("cal_repeat_until"), "", $today)
369  ->group("2", $this->lng->txt("r_14"))
370  ->date("until2", $this->lng->txt("cal_repeat_until"), "", $today)
371  ->group("4", $this->lng->txt("r_4_weeks"))
372  ->date("until4", $this->lng->txt("cal_repeat_until"), "", $today)
373  ->end();
374  return $form;
375  }
const IL_CAL_UNIX
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ processNumberForm()

ilBookingProcessWithScheduleGUI::processNumberForm ( )

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

References $message, checkAvailability(), ILIAS\Repository\ctrl(), getBookgingObjectTitle(), getNumberForm(), and getRecurrenceForm().

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

◆ selectObjects()

ilBookingProcessWithScheduleGUI::selectObjects ( )
protected

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

References ILIAS\Repository\ctrl().

186  : void
187  {
188  $this->log->debug("selectObjects");
189  $obj_ids = $this->book_request->getObjectIds();
190  $this->object_selection->setSelectedObjects($obj_ids);
191  $this->ctrl->redirect($this, "week");
192  }
+ Here is the call graph for this function:

◆ showNumberForm()

ilBookingProcessWithScheduleGUI::showNumberForm ( )

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

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

244  : void
245  {
246  $this->log->debug("showNumberForm");
247  $object_id = $this->book_obj_id;
248  $from = $this->book_request->getSlotFrom();
249  $to = $this->book_request->getSlotTo() - 1;
250  $this->tabs_gui->clearTargets();
251  $this->tabs_gui->setBackTarget(
252  $this->lng->txt('book_back_to_list'),
253  $this->ctrl->getLinkTarget($this, 'back')
254  );
255  $form = $this->getNumberForm($from, $to);
256  $this->gui->modal($this->getBookgingObjectTitle())
257  ->form($form)
258  ->send();
259  }
+ Here is the call graph for this function:

◆ week()

ilBookingProcessWithScheduleGUI::week ( )

First step in booking process.

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

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

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

Field Documentation

◆ $access

ilAccessHandler ilBookingProcessWithScheduleGUI::$access
protected

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

◆ $book_obj_id

int ilBookingProcessWithScheduleGUI::$book_obj_id
protected

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

Referenced by showNumberForm().

◆ $book_request

ILIAS BookingManager StandardGUIRequest ilBookingProcessWithScheduleGUI::$book_request
protected

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

◆ $booking_object_id

int ilBookingProcessWithScheduleGUI::$booking_object_id
protected

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

Referenced by __construct().

◆ $context_obj_id

int ilBookingProcessWithScheduleGUI::$context_obj_id
protected

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

Referenced by __construct().

◆ $ctrl

ilCtrl ilBookingProcessWithScheduleGUI::$ctrl
protected

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

Referenced by executeCommand().

◆ $gui

ILIAS BookingManager InternalGUIService ilBookingProcessWithScheduleGUI::$gui
protected

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

◆ $help

ilBookingHelpAdapter ilBookingProcessWithScheduleGUI::$help
protected

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

◆ $http

ILIAS HTTP Services ilBookingProcessWithScheduleGUI::$http
protected

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

◆ $lng

ilLanguage ilBookingProcessWithScheduleGUI::$lng
protected

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

◆ $log

ilLogger ilBookingProcessWithScheduleGUI::$log
protected

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

◆ $object_manager

ILIAS BookingManager Objects ObjectsManager ilBookingProcessWithScheduleGUI::$object_manager
protected

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

◆ $object_selection

ILIAS BookingManager BookingProcess ObjectSelectionManager ilBookingProcessWithScheduleGUI::$object_selection
protected

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

◆ $pool

ilObjBookingPool ilBookingProcessWithScheduleGUI::$pool
protected

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

Referenced by __construct().

◆ $process

ILIAS BookingManager BookingProcess BookingProcessManager ilBookingProcessWithScheduleGUI::$process
protected

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

◆ $raw_post_data

array ilBookingProcessWithScheduleGUI::$raw_post_data
protected

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

◆ $repo

ILIAS BookingManager InternalRepoService ilBookingProcessWithScheduleGUI::$repo
protected

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

◆ $reservation

ILIAS BookingManager Reservations ReservationManager ilBookingProcessWithScheduleGUI::$reservation
protected

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

◆ $rsv_ids

array ilBookingProcessWithScheduleGUI::$rsv_ids = []
protected

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

◆ $seed

string ilBookingProcessWithScheduleGUI::$seed
protected

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

Referenced by __construct(), book(), and week().

◆ $tabs_gui

ilTabsGUI ilBookingProcessWithScheduleGUI::$tabs_gui
protected

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

◆ $tpl

ilGlobalTemplateInterface ilBookingProcessWithScheduleGUI::$tpl
protected

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

Referenced by book(), and week().

◆ $user

ilObjUser ilBookingProcessWithScheduleGUI::$user
protected

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

◆ $user_id_assigner

int ilBookingProcessWithScheduleGUI::$user_id_assigner
protected

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

Referenced by __construct().

◆ $user_id_to_book

int ilBookingProcessWithScheduleGUI::$user_id_to_book
protected

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

◆ $util_gui

ILIAS BookingManager BookingProcess ProcessUtilGUI ilBookingProcessWithScheduleGUI::$util_gui
protected

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


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