ILIAS  release_8 Revision v8.24
ilObjBookingPoolGUI 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 ilObjBookingPoolGUI:
+ Collaboration diagram for ilObjBookingPoolGUI:

Public Member Functions

 editObject ()
 
 showNoScheduleMessage ()
 
 addExternalEditFormCustom (ilPropertyFormGUI $form)
 
 infoScreenObject ()
 this one is called from the info button in the repository More...
 
 infoScreen ()
 
 showProfileObject ()
 
 saveNotificationObject ()
 
- Public Member Functions inherited from ilObjectGUI
 __construct ($data, int $id=0, bool $call_by_reference=true, bool $prepare_output=true)
 
 getRefId ()
 
 setAdminMode (string $mode)
 
 getAdminMode ()
 
 getObject ()
 
 executeCommand ()
 
 withReferences ()
 determines whether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode (bool $mode=true)
 if true, a creation screen is displayed the current [ref_id] don't belong to the current class! The mode is determined in ilRepositoryGUI More...
 
 getCreationMode ()
 
 prepareOutput (bool $show_sub_objects=true)
 
 getAdminTabs ()
 administration tabs show only permissions and trash folder More...
 
 getHTML ()
 
 confirmedDeleteObject ()
 confirmed deletion of object -> objects are moved to trash or deleted immediately, if trash is disabled More...
 
 cancelDeleteObject ()
 cancel deletion of object More...
 
 cancelObject ()
 cancel action and go back to previous page More...
 
 createObject ()
 create new object form More...
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 
 getDidacticTemplateVar (string $type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $obj, int $parent_node_id=null)
 Add object to tree at given position. More...
 
 editObject ()
 
 addExternalEditFormCustom (ilPropertyFormGUI $form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction (string $cmd, string $default_form_action="")
 Get form action for command (command is method name without "Object", e.g. More...
 
 isVisible (int $ref_id, string $type)
 
 viewObject ()
 viewObject container presentation for "administration -> repository, trash, permissions" More...
 
 deleteObject (bool $error=false)
 Display deletion confirmation screen. More...
 
 setColumnSettings (ilColumnGUI $column_gui)
 
 redirectAfterCreation ()
 Redirect after creation, see https://docu.ilias.de/goto_docu_wiki_wpage_5035_1357.html Should be overwritten and redirect to settings screen. More...
 
 addToDeskObject ()
 
 removeFromDeskObject ()
 
- Public Member Functions inherited from ILIAS\Object\ImplementsCreationCallback
 callCreationCallback (\ilObject $object, \ilObjectDefinition $obj_definition, int $requested_crtcb)
 

Static Public Member Functions

static _goto (string $a_target)
 
- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot (bool $raise_error=false)
 Goto repository root. More...
 
static _gotoRepositoryNode (int $ref_id, string $cmd="")
 
static _gotoSharedWorkspaceNode (int $wsp_id)
 

Protected Member Functions

 initCreationForms (string $new_type)
 Init creation forms. More...
 
 afterSave (ilObject $new_object)
 Post (successful) object creation hook. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 initEditCustomForm (ilPropertyFormGUI $form)
 Add custom fields to update form. More...
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 updateCustom (ilPropertyFormGUI $form)
 Insert custom update form values into object. More...
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 initHeaderAction (?string $sub_type=null, ?int $sub_id=null)
 Add header action menu. More...
 
- Protected Member Functions inherited from ilObjectGUI
 getObjectService ()
 
 assignObject ()
 
 setTitleAndDescription ()
 
 initHeaderAction (?string $sub_type=null, ?int $sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction (?ilObjectListGUI $list_gui=null)
 Insert header action into main template. More...
 
 addHeaderAction ()
 Add header action menu. More...
 
 redrawHeaderActionObject ()
 Ajax call: redraw action header only. More...
 
 setTabs ()
 set admin tabs More...
 
 setAdminTabs ()
 set admin tabs More...
 
 setLocator ()
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator (bool $omit=true)
 
 addAdminLocatorItems (bool $do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 initCreationForms (string $new_type)
 Init creation forms. More...
 
 getCreationFormsHTML (array $forms)
 Get HTML for creation forms (accordion) More...
 
 initCreateForm (string $new_type)
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates. More...
 
 afterSave (ilObject $new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 validateCustom (ilPropertyFormGUI $form)
 Validate custom values (if not possible with checkInput()) More...
 
 updateCustom (ilPropertyFormGUI $form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 initImportForm (string $new_type)
 
 importFileObject (int $parent_id=null)
 
 afterImport (ilObject $new_object)
 Post (successful) object import hook. More...
 
 setFormAction (string $cmd, string $form_action)
 
 getReturnLocation (string $cmd, string $default_location="")
 Get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation (string $cmd, string $location)
 set specific return location for command More...
 
 getTargetFrame (string $cmd, string $default_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame (string $cmd, string $target_frame)
 Set specific target frame for command. More...
 
 showPossibleSubObjects ()
 show possible sub objects (pull down menu) More...
 
 getTabs ()
 @abstract overwrite in derived GUI class of your object type More...
 
 redirectToRefId (int $ref_id, string $cmd="")
 redirects to (repository) view per ref id usually to a container and usually used at the end of a save/import method where the object gui type (of the new object) doesn't match with the type of the current ["ref_id"] value of the request More...
 
 fillCloneTemplate (?string $tpl_name, string $type)
 Fill object clone template This method can be called from any object GUI class that wants to offer object cloning. More...
 
 getCenterColumnHTML ()
 Get center column. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 checkPermission (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 checkPermissionBool (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 showCustomIconsEditing ( $input_colspan=1, ilPropertyFormGUI $form=null, $as_section=true)
 show edit section of custom icons for container More...
 

Protected Attributes

ILIAS BookingManager InternalDomainService $domain
 
ilCronManager $cron_manager
 
ILIAS BookingManager StandardGUIRequest $book_request
 
ILIAS BookingManager InternalService $service
 
ilTabsGUI $tabs
 
ilNavigationHistory $nav_history
 
ilBookingHelpAdapter $help
 
int $user_id_to_book
 
int $user_id_assigner
 
string $seed
 
string $sseed
 
int $profile_user_id
 
int $book_obj_id
 
string $reservation_id
 
- Protected Attributes inherited from ilObjectGUI
ILIAS Notes Service $notes_service
 
ServerRequestInterface $request
 
ilLocatorGUI $locator
 
ilObjUser $user
 
ilAccessHandler $access
 
ilSetting $settings
 
ilToolbarGUI $toolbar
 
ilRbacAdmin $rbac_admin
 
ilRbacSystem $rbac_system
 
ilRbacReview $rbac_review
 
ilObjectService $object_service
 
ilObjectDefinition $obj_definition
 
ilGlobalTemplateInterface $tpl
 
ilTree $tree
 
ilCtrl $ctrl
 
ilErrorHandling $error
 
ilLanguage $lng
 
ilTabsGUI $tabs_gui
 
ILIAS $ilias
 
ArrayBasedRequestWrapper $post_wrapper
 
RequestWrapper $request_wrapper
 
Factory $refinery
 
ilFavouritesManager $favourites
 
ilObjectCustomIconFactory $custom_icon_factory
 
ilObject $object = null
 
bool $creation_mode = false
 
 $data
 
int $id
 
bool $call_by_reference = false
 
bool $prepare_output
 
int $ref_id
 
int $obj_id
 
int $maxcount
 
array $form_action = []
 
array $return_location = []
 
array $target_frame = []
 
string $tmp_import_dir
 
string $sub_objects = ""
 
bool $omit_locator = false
 
string $type = ""
 
string $admin_mode = self::ADMIN_MODE_NONE
 
int $requested_ref_id = 0
 
int $requested_crtptrefid = 0
 
int $requested_crtcb = 0
 
string $requested_new_type = ""
 
string $link_params
 
string $html = ""
 

Additional Inherited Members

- Data Fields inherited from ilObjectGUI
const ALLOWED_TAGS_IN_TITLE_AND_DESCRIPTION
 
const ADMIN_MODE_NONE = ""
 
const ADMIN_MODE_SETTINGS = "settings"
 
const ADMIN_MODE_REPOSITORY = "repository"
 
const UPLOAD_TYPE_LOCAL = 1
 
const UPLOAD_TYPE_UPLOAD_DIRECTORY = 2
 
const CFORM_NEW = 1
 
const CFORM_IMPORT = 2
 
const CFORM_CLONE = 3
 

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

Author
Jörg Lützenkirchen luetz.nosp@m.enki.nosp@m.rchen.nosp@m.@lei.nosp@m.fos.c.nosp@m.om @ilCtrl_Calls ilObjBookingPoolGUI: ilPermissionGUI, ilBookingObjectGUI, ilDidacticTemplateGUI @ilCtrl_Calls ilObjBookingPoolGUI: ilBookingScheduleGUI, ilInfoScreenGUI, ilPublicUserProfileGUI @ilCtrl_Calls ilObjBookingPoolGUI: ilCommonActionDispatcherGUI, ilObjectCopyGUI, ilObjectMetaDataGUI @ilCtrl_Calls ilObjBookingPoolGUI: ilBookingParticipantGUI, ilBookingReservationsGUI, ilBookingPreferencesGUI @ilCtrl_IsCalledBy ilObjBookingPoolGUI: ilRepositoryGUI, ilAdministrationGUI

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

Member Function Documentation

◆ _goto()

static ilObjBookingPoolGUI::_goto ( string  $a_target)
static

Definition at line 579 of file class.ilObjBookingPoolGUI.php.

579 : 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 }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
static _gotoRepositoryRoot(bool $raise_error=false)
Goto repository root.
static _gotoRepositoryNode(int $ref_id, string $cmd="")
ilLanguage $lng
static _lookupObjId(int $ref_id)
static _lookupTitle(int $obj_id)
const ROOT_FOLDER_ID
Definition: constants.php:32
global $DIC
Definition: feed.php:28

References $DIC, $lng, ilObjectGUI\_gotoRepositoryNode(), ilObjectGUI\_gotoRepositoryRoot(), ilObject\_lookupObjId(), ilObject\_lookupTitle(), and ROOT_FOLDER_ID.

+ Here is the call graph for this function:

◆ addExternalEditFormCustom()

ilObjBookingPoolGUI::addExternalEditFormCustom ( ilPropertyFormGUI  $form)

Reimplemented from ilObjectGUI.

Definition at line 475 of file class.ilObjBookingPoolGUI.php.

475 : void
476 {
478 $this->object->getId(),
479 $form,
481 );
482 }
static initServiceSettingsForm(int $obj_id, ilPropertyFormGUI $form, array $services)

References ilObjectServiceSettingsGUI\CUSTOM_METADATA, ilObjectServiceSettingsGUI\initServiceSettingsForm(), and ILIAS\Repository\object().

Referenced by editObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addLocatorItems()

ilObjBookingPoolGUI::addLocatorItems ( )
protected

should be overwritten to add object specific items (repository items are preloaded)

Reimplemented from ilObjectGUI.

Definition at line 662 of file class.ilObjBookingPoolGUI.php.

662 : 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 }
addItem(string $a_title, string $a_link, string $a_frame="", int $a_ref_id=0, ?string $type=null)
ilLocatorGUI $locator

References ILIAS\Repository\object().

+ Here is the call graph for this function:

◆ afterSave()

ilObjBookingPoolGUI::afterSave ( ilObject  $new_object)
protected

Post (successful) object creation hook.

Reimplemented from ilObjectGUI.

Definition at line 253 of file class.ilObjBookingPoolGUI.php.

253 : 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 }

References ILIAS\Repository\ctrl(), ilObject\getRefId(), ILIAS\Repository\lng(), and ilObject\update().

+ Here is the call graph for this function:

◆ afterUpdate()

ilObjBookingPoolGUI::afterUpdate ( )
protected

Post (successful) object update hook.

Reimplemented from ilObjectGUI.

Definition at line 264 of file class.ilObjBookingPoolGUI.php.

264 : 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 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getDidacticTemplateVar(string $type)
Get didactic template setting from creation screen.

References ILIAS\Repository\ctrl(), ilObjectGUI\getDidacticTemplateVar(), ilDidacticTemplateObjSettings\lookupTemplateId(), and ILIAS\Repository\object().

+ Here is the call graph for this function:

◆ editObject()

ilObjBookingPoolGUI::editObject ( )

Reimplemented from ilObjectGUI.

Definition at line 284 of file class.ilObjBookingPoolGUI.php.

284 : 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 }
error(string $a_errmsg)
addExternalEditFormCustom(ilPropertyFormGUI $form)
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $ref_id=null)

References addExternalEditFormCustom(), ilObjectGUI\checkPermissionBool(), error(), ilObjectGUI\getEditFormValues(), ilObjectGUI\initEditForm(), ILIAS\Repository\lng(), and showNoScheduleMessage().

+ Here is the call graph for this function:

◆ getEditFormCustomValues()

ilObjBookingPoolGUI::getEditFormCustomValues ( array &  $a_values)
protected

Add values to custom edit fields.

Reimplemented from ilObjectGUI.

Definition at line 427 of file class.ilObjBookingPoolGUI.php.

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 }
const IL_CAL_UNIX
@classDescription Date and time handling

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

+ Here is the call graph for this function:

◆ infoScreen()

ilObjBookingPoolGUI::infoScreen ( )

Definition at line 610 of file class.ilObjBookingPoolGUI.php.

610 : 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 }
Class ilInfoScreenGUI.
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

◆ infoScreenObject()

ilObjBookingPoolGUI::infoScreenObject ( )

this one is called from the info button in the repository

Definition at line 603 of file class.ilObjBookingPoolGUI.php.

603 : void
604 {
605 $this->ctrl->setCmd("showSummary");
606 $this->ctrl->setCmdClass("ilinfoscreengui");
607 $this->infoScreen();
608 }

References ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ initCreationForms()

ilObjBookingPoolGUI::initCreationForms ( string  $new_type)
protected

Init creation forms.

This will create the default creation forms: new, import, clone

Returns
array<int, ilPropertyFormGUI>

Reimplemented from ilObjectGUI.

Definition at line 245 of file class.ilObjBookingPoolGUI.php.

245 : array
246 {
247 $forms = parent::initCreationForms($new_type);
248 unset($forms[self::CFORM_IMPORT]);
249
250 return $forms;
251 }

◆ initEditCustomForm()

ilObjBookingPoolGUI::initEditCustomForm ( ilPropertyFormGUI  $a_form)
protected

Add custom fields to update form.

Reimplemented from ilObjectGUI.

Definition at line 314 of file class.ilObjBookingPoolGUI.php.

314 : 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 }
static getList(int $a_pool_id, string $a_title=null)
Get list of booking objects.
This class represents a checkbox 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 class represents a number property in a property form.
initDidacticTemplate(ilPropertyFormGUI $form)
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...

References ilObjectGUI\$type, ilPropertyFormGUI\addItem(), ilBookingObject\getList(), ilObjectGUI\getObjectService(), ilObjectGUI\initDidacticTemplate(), ILIAS\Repository\lng(), ILIAS\Repository\object(), ilObjBookingPool\TYPE_FIX_SCHEDULE, ilObjBookingPool\TYPE_NO_SCHEDULE, and ilObjBookingPool\TYPE_NO_SCHEDULE_PREFERENCES.

+ Here is the call graph for this function:

◆ initHeaderAction()

ilObjBookingPoolGUI::initHeaderAction ( ?string  $sub_type = null,
?int  $sub_id = null 
)
protected

Add header action menu.

Reimplemented from ilObjectGUI.

Definition at line 671 of file class.ilObjBookingPoolGUI.php.

672 {
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 }
setParameter(object $a_gui_obj, string $a_parameter, $a_value)
@inheritDoc
getLinkTarget(object $a_gui_obj, string $a_cmd=null, string $a_anchor=null, bool $is_async=false, bool $has_xml_style=false)
@inheritDoc
loadLanguageModule(string $a_module)
Load language module.
static hasNotification(int $type, int $user_id, int $id)
Check notification status for object and user.
ilAccessHandler $access
static getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
checkAccess(string $a_permission, string $a_cmd, int $a_ref_id, string $a_type="", ?int $a_obj_id=null, ?int $a_tree_id=null)
check access for an object (provide $a_type and $a_obj_id if available for better performance)

References $lng, ilUtil\getImagePath(), ilNotification\hasNotification(), ILIAS\Repository\object(), ilNotification\TYPE_BOOK, and ilObjBookingPool\TYPE_FIX_SCHEDULE.

+ Here is the call graph for this function:

◆ saveNotificationObject()

ilObjBookingPoolGUI::saveNotificationObject ( )

Definition at line 722 of file class.ilObjBookingPoolGUI.php.

722 : void
723 {
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 }
redirect(object $a_gui_obj, string $a_cmd=null, string $a_anchor=null, bool $is_async=false)
@inheritDoc
static setNotification(int $type, int $user_id, int $id, bool $status=true)
Set notification status for object and user.

References ilNotification\setNotification(), and ilNotification\TYPE_BOOK.

+ Here is the call graph for this function:

◆ showNoScheduleMessage()

ilObjBookingPoolGUI::showNoScheduleMessage ( )

Definition at line 304 of file class.ilObjBookingPoolGUI.php.

304 : 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 }
static getList(int $a_pool_id)
Get list of booking objects for given pool.

References ilBookingSchedule\getList(), ILIAS\Repository\lng(), ILIAS\Repository\object(), and ilObjBookingPool\TYPE_FIX_SCHEDULE.

Referenced by editObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showProfileObject()

ilObjBookingPoolGUI::showProfileObject ( )

Definition at line 648 of file class.ilObjBookingPoolGUI.php.

648 : 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 }
ilGlobalTemplateInterface $tpl
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setContent(string $a_html)
Sets content for standard template.

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

+ Here is the call graph for this function:

◆ updateCustom()

ilObjBookingPoolGUI::updateCustom ( ilPropertyFormGUI  $form)
protected

Insert custom update form values into object.

Reimplemented from ilObjectGUI.

Definition at line 443 of file class.ilObjBookingPoolGUI.php.

443 : 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 }
static updateServiceSettingsForm(int $obj_id, ilPropertyFormGUI $form, array $services)
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)

References ilObjectServiceSettingsGUI\CUSTOM_METADATA, ilPropertyFormGUI\getInput(), ilPropertyFormGUI\getItemByPostVar(), IL_CAL_UNIX, ILIAS\Repository\object(), and ilObjectServiceSettingsGUI\updateServiceSettingsForm().

+ Here is the call graph for this function:

Field Documentation

◆ $book_obj_id

int ilObjBookingPoolGUI::$book_obj_id
protected

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

◆ $book_request

ILIAS BookingManager StandardGUIRequest ilObjBookingPoolGUI::$book_request
protected

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

◆ $cron_manager

ilCronManager ilObjBookingPoolGUI::$cron_manager
protected

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

◆ $domain

ILIAS BookingManager InternalDomainService ilObjBookingPoolGUI::$domain
protected

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

◆ $help

ilBookingHelpAdapter ilObjBookingPoolGUI::$help
protected

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

◆ $nav_history

ilNavigationHistory ilObjBookingPoolGUI::$nav_history
protected

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

◆ $profile_user_id

int ilObjBookingPoolGUI::$profile_user_id
protected

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

◆ $reservation_id

string ilObjBookingPoolGUI::$reservation_id
protected

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

◆ $seed

string ilObjBookingPoolGUI::$seed
protected

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

◆ $service

ILIAS BookingManager InternalService ilObjBookingPoolGUI::$service
protected

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

◆ $sseed

string ilObjBookingPoolGUI::$sseed
protected

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

◆ $tabs

ilTabsGUI ilObjBookingPoolGUI::$tabs
protected

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

◆ $user_id_assigner

int ilObjBookingPoolGUI::$user_id_assigner
protected

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

◆ $user_id_to_book

int ilObjBookingPoolGUI::$user_id_to_book
protected

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


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