ILIAS  release_8 Revision v8.24
class.ilObjBookingPoolGUI.php
Go to the documentation of this file.
1<?php
2
28{
29 protected \ILIAS\BookingManager\InternalDomainService $domain;
31 protected \ILIAS\BookingManager\StandardGUIRequest $book_request;
32 protected \ILIAS\BookingManager\InternalService $service;
33 protected ilTabsGUI $tabs;
36 protected int $user_id_to_book; // user who is getting the reservation
37 protected int $user_id_assigner; // user who performs the reservation.(self/another)
38 protected string $seed;
39 protected string $sseed;
40 protected int $profile_user_id;
41 protected int $book_obj_id;
42 protected string $reservation_id;
43
44 public function __construct(
45 $a_data,
46 int $a_id,
47 bool $a_call_by_reference,
48 bool $a_prepare_output = true
49 ) {
50 global $DIC;
51
52 $this->tpl = $DIC["tpl"];
53 $this->tabs = $DIC->tabs();
54 $this->nav_history = $DIC["ilNavigationHistory"];
55 $this->ctrl = $DIC->ctrl();
56 $this->lng = $DIC->language();
57 $this->type = "book";
58
59 $this->book_request = $DIC->bookingManager()
60 ->internal()
61 ->gui()
62 ->standardRequest();
63
64 parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
65 $this->lng->loadLanguageModule("book");
66
67 // not on creation
68 if (is_object($this->object)) {
70 $pool = $this->object;
71 $this->help = new ilBookingHelpAdapter($pool, $DIC["ilHelp"]);
72 $DIC["ilHelp"]->setScreenIdComponent("book");
73 }
74
75 $this->book_obj_id = $this->book_request->getObjectId();
76 $this->seed = $this->book_request->getSeed();
77 $this->sseed = $this->book_request->getSSeed();
78 $this->reservation_id = $this->book_request->getReservationId();
79 $this->profile_user_id = $this->book_request->getUserId();
80
81 $this->service = $DIC->bookingManager()->internal();
82
83 $this->user_id_assigner = $this->user->getId();
84 if ($this->book_request->getBookedUser() > 0) {
85 $this->user_id_to_book = $this->book_request->getBookedUser();
86 } else {
87 $this->user_id_to_book = $this->user_id_assigner; // by default user books his own booking objects.
88 }
89
90 if ($this->book_request->getObjectId() > 0 &&
91 ilBookingObject::lookupPoolId($this->book_request->getObjectId()) !== $this->object->getId()) {
92 throw new ilException("Booking Object ID does not match Booking Pool.");
93 }
94 $this->cron_manager = $DIC->cron()->manager();
95 $this->domain = $DIC->bookingManager()->internal()->domain();
96 }
97
103 public function executeCommand(): void
104 {
106 $ilTabs = $this->tabs;
107 $ilNavigationHistory = $this->nav_history;
109
110 $next_class = $this->ctrl->getNextClass($this);
111 $cmd = $this->ctrl->getCmd();
112
113 if (!$next_class && $cmd === 'render') {
114 if ($ilUser->getId() !== ANONYMOUS_USER_ID) {
115 if ($this->object->getScheduleType() === ilObjBookingPool::TYPE_NO_SCHEDULE_PREFERENCES &&
116 !$this->checkPermissionBool('write')) {
117 $this->ctrl->setCmdClass('ilBookingPreferencesGUI');
118 } else {
119 $this->ctrl->setCmdClass('ilBookingObjectGUI');
120 }
121 $next_class = $this->ctrl->getNextClass($this);
122 } else {
123 $this->ctrl->redirect($this, "infoscreen");
124 }
125 }
126
127 $ilNavigationHistory->addItem(
128 $this->ref_id,
129 "./goto.php?target=book_" . $this->ref_id,
130 "book"
131 );
132
133 $this->prepareOutput();
134
135 switch ($next_class) {
136 case 'ilpermissiongui':
137 $this->checkPermission('edit_permission');
138 $this->tabs_gui->setTabActive('perm_settings');
139 $perm_gui = new ilPermissionGUI($this);
140 $this->ctrl->forwardCommand($perm_gui);
141 break;
142
143 case 'ilbookingobjectgui':
144 if (!$this->checkPermissionBool('read') && $this->checkPermissionBool('visible')) {
145 $this->ctrl->redirect($this, "infoScreen");
146 }
147 $this->checkPermission('read');
148 $this->tabs_gui->setTabActive('render');
149 $object_gui = new ilBookingObjectGUI(
150 $this,
151 $this->seed,
152 $this->sseed,
153 $this->help
154 );
155 $this->ctrl->forwardCommand($object_gui);
156 break;
157
158 case 'ilbookingschedulegui':
159 $this->checkPermission('write');
160 $this->tabs_gui->setTabActive('schedules');
161 $schedule_gui = new ilBookingScheduleGUI($this);
162 $this->ctrl->forwardCommand($schedule_gui);
163 break;
164
165 case 'ilpublicuserprofilegui':
166 $this->checkPermission('read');
167 $ilTabs->clearTargets();
168 $profile = new ilPublicUserProfileGUI($this->profile_user_id);
169 $profile->setBackUrl($this->ctrl->getLinkTargetByClass("ilbookingreservationsgui", ''));
170 $ret = $this->ctrl->forwardCommand($profile);
171 $tpl->setContent($ret);
172 break;
173
174 case 'ilinfoscreengui':
175 $this->checkPermission('visible');
176 $this->infoScreen();
177 break;
178
179 case "ilcommonactiondispatchergui":
180 $this->checkPermission('read');
182 if ($gui !== null) {
183 $this->ctrl->forwardCommand($gui);
184 }
185 break;
186
187 case "ilobjectcopygui":
188 $this->checkPermission('copy');
189 $cp = new ilObjectCopyGUI($this);
190 $cp->setType("book");
191 $this->ctrl->forwardCommand($cp);
192 break;
193
194 case 'ilobjectmetadatagui':
195 $this->checkPermission('write');
196 $this->tabs_gui->setTabActive('meta_data');
197 $md_gui = new ilObjectMetaDataGUI($this->object, 'bobj');
198 $this->ctrl->forwardCommand($md_gui);
199 break;
200
201 case 'ilbookingparticipantgui':
202 $this->checkPermission('write');
203 $this->tabs_gui->setTabActive('participants');
204 $object_gui = new ilBookingParticipantGUI($this);
205 $this->ctrl->forwardCommand($object_gui);
206 break;
207
208
209 case "ilbookingreservationsgui":
210 $this->tabs_gui->setTabActive('log');
212 $pool = $this->object;
213 $res_gui = new ilBookingReservationsGUI($pool, $this->help);
214 $this->ctrl->forwardCommand($res_gui);
215 break;
216
217 case 'ilbookingpreferencesgui':
218 $this->tabs_gui->setTabActive('preferences');
220 $pool = $this->object;
221 $gui = $this->service->gui()->preferences()->BookingPreferencesGUI($pool);
222 $this->ctrl->forwardCommand($gui);
223 break;
224
225 case 'ildidactictemplategui':
226 $this->ctrl->setReturn($this, 'edit');
227 $did = new ilDidacticTemplateGUI($this);
228 $this->ctrl->forwardCommand($did);
229 break;
230
231
232 default:
233 if (!in_array($cmd, ["create", "save", "infoScreen"])) {
234 $this->checkPermission('read');
235 }
236 $cmd = $this->ctrl->getCmd();
237 $cmd .= 'Object';
238 $this->$cmd();
239 break;
240 }
241
242 $this->addHeaderAction();
243 }
244
245 protected function initCreationForms(string $new_type): array
246 {
247 $forms = parent::initCreationForms($new_type);
248 unset($forms[self::CFORM_IMPORT]);
249
250 return $forms;
251 }
252
253 protected function afterSave(ilObject $new_object): void
254 {
255 $new_object->setOffline(true);
256 $new_object->update();
257
258 // always send a message
259 $this->tpl->setOnScreenMessage('success', $this->lng->txt("book_pool_added"), true);
260 $this->ctrl->setParameter($this, "ref_id", $new_object->getRefId());
261 $this->ctrl->redirect($this, "edit");
262 }
263
264 protected function afterUpdate(): void
265 {
266 // check if template is changed
268 $this->object->getRefId()
269 );
270 $new_tpl_id = $this->getDidacticTemplateVar('dtpl');
271
272 if ($new_tpl_id !== $current_tpl_id) {
273 // redirect to didactic template confirmation
274 $this->ctrl->setReturn($this, 'edit');
275 $this->ctrl->setCmdClass('ildidactictemplategui');
276 $this->ctrl->setCmd('confirmTemplateSwitch');
277 $dtpl_gui = new ilDidacticTemplateGUI($this, $new_tpl_id);
278 $this->ctrl->forwardCommand($dtpl_gui);
279 return;
280 }
281 parent::afterUpdate();
282 }
283
284 public function editObject(): void
285 {
286 $this->showNoScheduleMessage();
287 if (!$this->checkPermissionBool("write")) {
288 $this->error->raiseError($this->lng->txt("msg_no_perm_write"), $this->error->MESSAGE);
289 }
290
291 $this->tabs_gui->activateTab("settings");
292
293 $form = $this->initEditForm();
294 $values = $this->getEditFormValues();
295 if ($values) {
296 $form->setValuesByArray($values, true);
297 }
298
299 $this->addExternalEditFormCustom($form);
300
301 $this->tpl->setContent($form->getHTML());
302 }
303
304 public function showNoScheduleMessage(): void
305 {
306 // if we have no schedules yet - show info
307 if ($this->object->getScheduleType() === ilObjBookingPool::TYPE_FIX_SCHEDULE &&
308 !count(ilBookingSchedule::getList($this->object->getId()))) {
309 $this->tpl->setOnScreenMessage('info', $this->lng->txt("book_schedule_warning_edit"));
310 }
311 }
312
313
314 protected function initEditCustomForm(ilPropertyFormGUI $form): void
315 {
316 $obj_service = $this->getObjectService();
317
318 // Show didactic template type
319 $this->initDidacticTemplate($form);
320
321 $type = new ilRadioGroupInputGUI($this->lng->txt("book_schedule_type"), "stype");
322 $type->setRequired(true);
323 $form->addItem($type);
324
325 // #14478
326 if (count(ilBookingObject::getList($this->object->getId()))) {
327 $type->setDisabled(true);
328 }
329
330 $fixed = new ilRadioOption($this->lng->txt("book_schedule_type_fixed"), ilObjBookingPool::TYPE_FIX_SCHEDULE);
331 $fixed->setInfo($this->lng->txt("book_schedule_type_fixed_info"));
332 $type->addOption($fixed);
333
334 #23637
335 //period
336 $period = new ilNumberInputGUI($this->lng->txt("book_reservation_filter_period"), "period");
337 $period->setInfo($this->lng->txt("book_reservation_filter_period_info"));
338 $period->setSuffix($this->lng->txt("days"));
339 $period->setSize(3);
340 $period->setMinValue(0);
341 $fixed->addSubItem($period);
342
343 // reminder
344 $rmd = new ilCheckboxInputGUI($this->lng->txt("book_reminder_setting"), "rmd");
345 $rmd->setChecked((bool) $this->object->getReminderStatus());
346 $info = $this->lng->txt("book_reminder_day_info");
347 if (!$this->cron_manager->isJobActive('book_notification')) {
348 $info .= " " . $this->lng->txt("book_notification_cron_not_active");
349 }
350 $rmd->setInfo($info);
351 $fixed->addSubItem($rmd);
352
353 $rmd_day = new ilNumberInputGUI($this->lng->txt("book_reminder_day"), "rmd_day");
354 $rmd_day->setRequired(true);
355 $rmd_day->setSize(3);
356 $rmd_day->setSuffix($this->lng->txt("book_reminder_days"));
357 $rmd_day->setValue(max($this->object->getReminderDay(), 1));
358 $rmd_day->setMinValue(1);
359 $rmd->addSubItem($rmd_day);
360
361 // no schedule, direct booking
362 $none = new ilRadioOption($this->lng->txt("book_schedule_type_none_direct"), ilObjBookingPool::TYPE_NO_SCHEDULE);
363 $none->setInfo($this->lng->txt("book_schedule_type_none_direct_info"));
364 $type->addOption($none);
365
366 $limit = new ilNumberInputGUI($this->lng->txt("book_overall_limit"), "limit");
367 $limit->setSize(4);
368 $limit->setMinValue(1);
369 $limit->setSuffix($this->lng->txt("book_bookings_per_user"));
370 $none->addSubItem($limit);
371
372 // no schedule, using preferences
373 $pref = new ilRadioOption($this->lng->txt("book_schedule_type_none_preference"), ilObjBookingPool::TYPE_NO_SCHEDULE_PREFERENCES);
374 $pref->setInfo($this->lng->txt("book_schedule_type_none_preference_info"));
375 $type->addOption($pref);
376
377 $pref_options_disabled = false;
378 if ($this->object->getScheduleType() === ilObjBookingPool::TYPE_NO_SCHEDULE_PREFERENCES) {
379 $pref_manager = $this->domain->preferences($this->object);
380 $pref_options_disabled = $pref_manager->hasRun();
381 }
382
383 // number of preferences
384 $pref_nr = new ilNumberInputGUI($this->lng->txt("book_nr_of_preferences"), "preference_nr");
385 $pref_nr->setSize(4);
386 $pref_nr->setMinValue(1);
387 $pref_nr->setInfo($this->lng->txt("book_nr_of_preferences_info"));
388 $pref_nr->setSuffix($this->lng->txt("book_nr_preferences"));
389 $pref_nr->setRequired(true);
390 $pref_nr->setDisabled($pref_options_disabled);
391 $pref->addSubItem($pref_nr);
392
393 // preference deadline
394 $pref_deadline = new ilDateTimeInputGUI($this->lng->txt("book_pref_deadline"), "pref_deadline");
395 $pref_deadline->setInfo($this->lng->txt("book_pref_deadline_info"));
396 $pref_deadline->setShowTime(true);
397 $pref_deadline->setRequired(true);
398 $pref_deadline->setDisabled($pref_options_disabled);
399 $pref->addSubItem($pref_deadline);
400
401 $public = new ilCheckboxInputGUI($this->lng->txt("book_public_log"), "public");
402 $public->setInfo($this->lng->txt("book_public_log_info"));
403 $form->addItem($public);
404
405 $this->lng->loadLanguageModule("rep");
406 $section = new ilFormSectionHeaderGUI();
407 $section->setTitle($this->lng->txt('rep_activation_availability'));
408 $form->addItem($section);
409
410 $online = new ilCheckboxInputGUI($this->lng->txt("online"), "online");
411 $form->addItem($online);
412
413 // presentation
414 $pres = new ilFormSectionHeaderGUI();
415 $pres->setTitle($this->lng->txt('obj_presentation'));
416 $form->addItem($pres);
417
418 // tile image
419 $obj_service->commonSettings()->legacyForm($form, $this->object)->addTileImage();
420
421 // additional features
422 $feat = new ilFormSectionHeaderGUI();
423 $feat->setTitle($this->lng->txt('obj_features'));
424 $form->addItem($feat);
425 }
426
427 protected function getEditFormCustomValues(
428 array &$a_values
429 ): void {
430 $a_values["online"] = !$this->object->isOffline();
431 $a_values["public"] = $this->object->hasPublicLog();
432 $a_values["stype"] = $this->object->getScheduleType();
433 $a_values["limit"] = $this->object->getOverallLimit();
434 $a_values["period"] = $this->object->getReservationFilterPeriod();
435 $a_values["rmd"] = $this->object->getReminderStatus();
436 $a_values["rmd_day"] = $this->object->getReminderDay();
437 $a_values["preference_nr"] = $this->object->getPreferenceNumber();
438 if ($this->object->getPreferenceDeadline() > 0) {
439 $a_values["pref_deadline"] = new ilDateTime($this->object->getPreferenceDeadline(), IL_CAL_UNIX);
440 }
441 }
442
443 protected function updateCustom(ilPropertyFormGUI $form): void
444 {
445 $obj_service = $this->getObjectService();
446
447 $pref_deadline = $form->getItemByPostVar("pref_deadline");
448 if ($pref_deadline !== null) {
449 $pref_deadline = $pref_deadline->getDate();
450 $pref_deadline = $pref_deadline
451 ? $pref_deadline->get(IL_CAL_UNIX)
452 : 0;
453
454 $this->object->setOffline(!$form->getInput('online'));
455 $this->object->setReminderStatus((int) $form->getInput('rmd'));
456 $this->object->setReminderDay($form->getInput('rmd_day'));
457 $this->object->setPublicLog($form->getInput('public'));
458 $this->object->setScheduleType($form->getInput('stype'));
459 $this->object->setOverallLimit($form->getInput('limit') ?: null);
460 $this->object->setReservationFilterPeriod($form->getInput('period') != '' ? (int) $form->getInput('period') : null);
461 $this->object->setPreferenceDeadline($pref_deadline);
462 $this->object->setPreferenceNumber($form->getInput('preference_nr'));
463
464 // tile image
465 $obj_service->commonSettings()->legacyForm($form, $this->object)->saveTileImage();
466
468 $this->object->getId(),
469 $form,
471 );
472 }
473 }
474
475 public function addExternalEditFormCustom(ilPropertyFormGUI $form): void
476 {
478 $this->object->getId(),
479 $form,
481 );
482 }
483
489 protected function setTabs(): void
490 {
491 $ilUser = $this->user;
492
494 $pool = $this->object;
495
496 if (!$this->ctrl->getNextClass() && in_array($this->ctrl->getCmd(), array("create", "save"))) {
497 return;
498 }
499
500 if ($this->checkPermissionBool('read')) {
501 if ($ilUser->getId() !== ANONYMOUS_USER_ID) {
502 if ($pool->getScheduleType() === ilObjBookingPool::TYPE_NO_SCHEDULE_PREFERENCES) {
503 $this->tabs_gui->addTab(
504 "preferences",
505 $this->lng->txt("book_pref_overview"),
506 $this->ctrl->getLinkTargetByClass("ilbookingpreferencesgui", "")
507 );
508 }
509
510 if ($pool->getScheduleType() !== ilObjBookingPool::TYPE_NO_SCHEDULE_PREFERENCES ||
511 $this->checkPermissionBool('write')) {
512 $this->tabs_gui->addTab(
513 "render",
514 $this->lng->txt("book_booking_objects"),
515 $this->ctrl->getLinkTarget($this, "render")
516 );
517 }
518 }
519
520 if ($ilUser->getId() !== ANONYMOUS_USER_ID || $this->object->hasPublicLog()) {
521 $this->tabs_gui->addTab(
522 "log",
523 $this->lng->txt("book_log"),
524 $this->ctrl->getLinkTargetByClass("ilbookingreservationsgui", "")
525 );
526 }
527
528 $this->tabs_gui->addTab(
529 "info",
530 $this->lng->txt("info_short"),
531 $this->ctrl->getLinkTarget($this, "infoscreen")
532 );
533 }
534
535 if ($this->checkPermissionBool('write')) {
536 $this->tabs_gui->addTab(
537 "settings",
538 $this->lng->txt("settings"),
539 $this->ctrl->getLinkTarget($this, "edit")
540 );
541
542 if ($this->object->getScheduleType() === ilObjBookingPool::TYPE_FIX_SCHEDULE) {
543 $this->tabs_gui->addTab(
544 "schedules",
545 $this->lng->txt("book_schedules"),
546 $this->ctrl->getLinkTargetByClass("ilbookingschedulegui", "render")
547 );
548 }
549
550 $this->tabs_gui->addTab(
551 "participants",
552 $this->lng->txt("participants"),
553 $this->ctrl->getLinkTargetByClass("ilbookingparticipantgui", "render")
554 );
555
556 // meta data
557 $mdgui = new ilObjectMetaDataGUI($this->object, "bobj");
558 $mdtab = $mdgui->getTab();
559 if ($mdtab) {
560 $this->tabs_gui->addTarget(
561 "meta_data",
562 $mdtab,
563 "",
564 "ilobjectmetadatagui"
565 );
566 }
567 }
568
569
570 if ($this->checkPermissionBool('edit_permission')) {
571 $this->tabs_gui->addTab(
572 "perm_settings",
573 $this->lng->txt("perm_settings"),
574 $this->ctrl->getLinkTargetByClass("ilpermissiongui", "perm")
575 );
576 }
577 }
578
579 public static function _goto(string $a_target): void
580 {
581 global $DIC;
582 $main_tpl = $DIC->ui()->mainTemplate();
583
584 $ilAccess = $DIC->access();
585 $lng = $DIC->language();
586
587 if ($ilAccess->checkAccess("read", "", $a_target)) {
588 ilObjectGUI::_gotoRepositoryNode($a_target, "render");
589 } elseif ($ilAccess->checkAccess("visible", "", $a_target)) {
590 ilObjectGUI::_gotoRepositoryNode($a_target, "infoScreen");
591 } elseif ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID)) {
592 $main_tpl->setOnScreenMessage('failure', sprintf(
593 $lng->txt("msg_no_perm_read_item"),
595 ), true);
597 }
598 }
599
603 public function infoScreenObject(): void
604 {
605 $this->ctrl->setCmd("showSummary");
606 $this->ctrl->setCmdClass("ilinfoscreengui");
607 $this->infoScreen();
608 }
609
610 public function infoScreen(): string
611 {
612 $ilCtrl = $this->ctrl;
613
614 $this->tabs_gui->setTabActive('info');
615
616 $this->checkPermission("visible");
617
618 $info = new ilInfoScreenGUI($this);
619
620 $info->enablePrivateNotes();
621
622 if ($this->checkPermissionBool("read")) {
623 $info->enableNews();
624 }
625
626 // no news editing for files, just notifications
627 $info->enableNewsEditing(false);
628 if ($this->checkPermissionBool("write")) {
629 $news_set = new ilSetting("news");
630 $enable_internal_rss = $news_set->get("enable_rss_for_internal");
631
632 if ($enable_internal_rss) {
633 $info->setBlockProperty("news", "settings", true);
634 $info->setBlockProperty("news", "public_notifications_option", true);
635 }
636 }
637
638 // forward the command
639 if ($ilCtrl->getNextClass() === "ilinfoscreengui") {
640 $ilCtrl->forwardCommand($info);
641 } else {
642 return $ilCtrl->getHTML($info);
643 }
644 return "";
645 }
646
647
648 public function showProfileObject(): void
649 {
651 $ilCtrl = $this->ctrl;
652
653 $this->tabs_gui->clearTargets();
654
655 $user_id = $this->profile_user_id;
656
657 $profile = new ilPublicUserProfileGUI($user_id);
658 $profile->setBackUrl($this->ctrl->getLinkTarget($this, 'log'));
659 $tpl->setContent($ilCtrl->getHTML($profile));
660 }
661
662 protected function addLocatorItems(): void
663 {
664 $ilLocator = $this->locator;
665
666 if (is_object($this->object)) {
667 $ilLocator->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this, "render"), "", $this->object->getRefId());
668 }
669 }
670
671 protected function initHeaderAction(?string $sub_type = null, ?int $sub_id = null): ?ilObjectListGUI
672 {
673 $access = $this->access;
674 $user = $this->user;
675 $ctrl = $this->ctrl;
677
678 $lng->loadLanguageModule("noti");
679
680 $lg = parent::initHeaderAction($sub_type, $sub_id);
681
682 if ($lg && $access->checkAccess("read", "", $this->ref_id)) {
683 if ($this->object->getScheduleType() === ilObjBookingPool::TYPE_FIX_SCHEDULE &&
684 $this->object->getReminderStatus()) {
685 // notification
688 $user->getId(),
689 $this->object->getId()
690 )) {
691 $lg->addHeaderIcon(
692 "not_icon",
693 ilUtil::getImagePath("notification_off.svg"),
694 $lng->txt("noti_notification_deactivated")
695 );
696
697 $ctrl->setParameter($this, "ntf", 1);
698 $caption = "noti_activate_notification";
699 } else {
700 $lg->addHeaderIcon(
701 "not_icon",
702 ilUtil::getImagePath("notification_on.svg"),
703 $lng->txt("noti_notification_activated")
704 );
705
706 $ctrl->setParameter($this, "ntf", 0);
707 $caption = "noti_deactivate_notification";
708 }
709
710 $lg->addCustomCommand(
711 $ctrl->getLinkTarget($this, "saveNotification"),
712 $caption
713 );
714
715 $ctrl->setParameter($this, "ntf", "");
716 }
717 }
718
719 return $lg;
720 }
721
722 public function saveNotificationObject(): void
723 {
724 $ctrl = $this->ctrl;
725 $user = $this->user;
726
727
728 switch ($this->book_request->getNotification()) {
729 case 0:
730 ilNotification::setNotification(ilNotification::TYPE_BOOK, $user->getId(), $this->object->getId(), false);
731 break;
732
733 case 1:
734 ilNotification::setNotification(ilNotification::TYPE_BOOK, $user->getId(), $this->object->getId(), true);
735 break;
736 }
737 $ctrl->redirect($this, "render");
738 }
739}
const IL_CAL_UNIX
error(string $a_errmsg)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static lookupPoolId(int $object_id)
static getList(int $a_pool_id, string $a_title=null)
Get list of booking objects.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getList(int $a_pool_id)
Get list of booking objects for given pool.
This class represents a checkbox property in a property form.
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
@classDescription Date and time handling
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class ilInfoScreenGUI.
Navigation History of Repository Items.
static setNotification(int $type, int $user_id, int $id, bool $status=true)
Set notification status for object and user.
static hasNotification(int $type, int $user_id, int $id)
Check notification status for object and user.
This class represents a number property in a property form.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
afterSave(ilObject $new_object)
Post (successful) object creation hook.
updateCustom(ilPropertyFormGUI $form)
Insert custom update form values into object.
ILIAS BookingManager StandardGUIRequest $book_request
getEditFormCustomValues(array &$a_values)
Add values to custom edit fields.
ilNavigationHistory $nav_history
ILIAS BookingManager InternalService $service
afterUpdate()
Post (successful) object update hook.
ILIAS BookingManager InternalDomainService $domain
static _goto(string $a_target)
infoScreenObject()
this one is called from the info button in the repository
ilBookingHelpAdapter $help
initCreationForms(string $new_type)
Init creation forms.
initEditCustomForm(ilPropertyFormGUI $form)
Add custom fields to update form.
addLocatorItems()
should be overwritten to add object specific items (repository items are preloaded)
initHeaderAction(?string $sub_type=null, ?int $sub_id=null)
Add header action menu.
addExternalEditFormCustom(ilPropertyFormGUI $form)
GUI class for the workflow of copying objects.
Class ilObjectGUI Basic methods of all Output classes.
ilGlobalTemplateInterface $tpl
__construct($data, int $id=0, bool $call_by_reference=true, bool $prepare_output=true)
static _gotoRepositoryRoot(bool $raise_error=false)
Goto repository root.
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
initDidacticTemplate(ilPropertyFormGUI $form)
addHeaderAction()
Add header action menu.
getDidacticTemplateVar(string $type)
Get didactic template setting from creation screen.
static _gotoRepositoryNode(int $ref_id, string $cmd="")
prepareOutput(bool $show_sub_objects=true)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static updateServiceSettingsForm(int $obj_id, ilPropertyFormGUI $form, array $services)
static initServiceSettingsForm(int $obj_id, ilPropertyFormGUI $form, array $services)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _lookupObjId(int $ref_id)
static _lookupTitle(int $obj_id)
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
This class represents a property form user interface.
getInput(string $a_post_var, bool $ensureValidation=true)
Returns the input of an item, if item provides getInput method and as fallback the value of the HTTP-...
getItemByPostVar(string $a_post_var)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This class represents a property in a property form.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
const ANONYMOUS_USER_ID
Definition: constants.php:27
const ROOT_FOLDER_ID
Definition: constants.php:32
global $DIC
Definition: feed.php:28
$ilUser
Definition: imgupload.php:34
setContent(string $a_html)
Sets content for standard template.
if($DIC->http() ->request() ->getMethod()=="GET" &&isset($DIC->http() ->request() ->getQueryParams()['tex'])) $tpl
Definition: latex.php:41
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
$lng