ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
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] does belong to the parent 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...
 
 cancelObject ()
 cancel action and go back to previous page More...
 
 createObject ()
 create new object form More...
 
 editAvailabilityPeriodObject ()
 
 saveAvailabilityPeriodObject ()
 
 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)
 
 afterSave (ilObject $new_object)
 
 afterUpdate ()
 
 initEditCustomForm (ilPropertyFormGUI $form)
 
 getEditFormCustomValues (array &$a_values)
 
 updateCustom (ilPropertyFormGUI $form)
 
 addLocatorItems ()
 
 initHeaderAction (?string $sub_type=null, ?int $sub_id=null)
 
- Protected Member Functions inherited from ilObjectGUI
 getObjectService ()
 
 assignObject ()
 
 setTitleAndDescription ()
 
 createActionDispatcherGUI ()
 
 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...
 
 addAdoptContentLinkToToolbar ()
 
 addAvailabilityPeriodButtonToToolbar (ilToolbarGUI $toolbar)
 
 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 ()
 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...
 
 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...
 

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
 
UIFactory $ui_factory
 
UIRenderer $ui_renderer
 
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

Member Function Documentation

◆ _goto()

static ilObjBookingPoolGUI::_goto ( string  $a_target)
static

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

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

589  : void
590  {
591  global $DIC;
592  $main_tpl = $DIC->ui()->mainTemplate();
593 
594  $ilAccess = $DIC->access();
595  $lng = $DIC->language();
596 
597  if ($ilAccess->checkAccess("read", "", $a_target)) {
598  ilObjectGUI::_gotoRepositoryNode($a_target, "render");
599  } elseif ($ilAccess->checkAccess("visible", "", $a_target)) {
600  ilObjectGUI::_gotoRepositoryNode($a_target, "infoScreen");
601  } elseif ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID)) {
602  $main_tpl->setOnScreenMessage('failure', sprintf(
603  $lng->txt("msg_no_perm_read_item"),
605  ), true);
607  }
608  }
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...
const ROOT_FOLDER_ID
Definition: constants.php:32
static _gotoRepositoryNode(int $ref_id, string $cmd="")
static _lookupObjId(int $ref_id)
global $DIC
Definition: feed.php:28
ilLanguage $lng
static _lookupTitle(int $obj_id)
static _gotoRepositoryRoot(bool $raise_error=false)
Goto repository root.
+ Here is the call graph for this function:

◆ addExternalEditFormCustom()

◆ addLocatorItems()

ilObjBookingPoolGUI::addLocatorItems ( )
protected

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

References ilObjectGUI\$locator, ilLocatorGUI\addItem(), ILIAS\Repository\ctrl(), and ILIAS\Repository\object().

672  : void
673  {
674  $ilLocator = $this->locator;
675 
676  if (is_object($this->object)) {
677  $ilLocator->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this, "render"), "", $this->object->getRefId());
678  }
679  }
addItem(string $a_title, string $a_link, string $a_frame="", int $a_ref_id=0, ?string $type=null)
ilLocatorGUI $locator
+ Here is the call graph for this function:

◆ afterSave()

ilObjBookingPoolGUI::afterSave ( ilObject  $new_object)
protected

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

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

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  }
+ Here is the call graph for this function:

◆ afterUpdate()

ilObjBookingPoolGUI::afterUpdate ( )
protected

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

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

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

◆ editObject()

ilObjBookingPoolGUI::editObject ( )

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

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

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  }
addExternalEditFormCustom(ilPropertyFormGUI $form)
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ getEditFormCustomValues()

ilObjBookingPoolGUI::getEditFormCustomValues ( array &  $a_values)
protected

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

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

437  : void {
438  $a_values["online"] = !$this->object->isOffline();
439  $a_values["public"] = $this->object->hasPublicLog();
440  $a_values["messages"] = $this->object->usesMessages();
441  $a_values["stype"] = $this->object->getScheduleType();
442  $a_values["limit"] = $this->object->getOverallLimit();
443  $a_values["period"] = $this->object->getReservationFilterPeriod();
444  $a_values["rmd"] = $this->object->getReminderStatus();
445  $a_values["rmd_day"] = $this->object->getReminderDay();
446  $a_values["preference_nr"] = $this->object->getPreferenceNumber();
447  if ($this->object->getPreferenceDeadline() > 0) {
448  $a_values["pref_deadline"] = new ilDateTime($this->object->getPreferenceDeadline(), IL_CAL_UNIX);
449  }
450  }
const IL_CAL_UNIX
+ Here is the call graph for this function:

◆ infoScreen()

ilObjBookingPoolGUI::infoScreen ( )

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

References ilObjectGUI\$ctrl, ilObjectGUI\checkPermission(), and ilObjectGUI\checkPermissionBool().

Referenced by infoScreenObject().

620  : string
621  {
622  $ilCtrl = $this->ctrl;
623 
624  $this->tabs_gui->setTabActive('info');
625 
626  $this->checkPermission("visible");
627 
628  $info = new ilInfoScreenGUI($this);
629 
630  $info->enablePrivateNotes();
631 
632  if ($this->checkPermissionBool("read")) {
633  $info->enableNews();
634  }
635 
636  // no news editing for files, just notifications
637  $info->enableNewsEditing(false);
638  if ($this->checkPermissionBool("write")) {
639  $news_set = new ilSetting("news");
640  $enable_internal_rss = $news_set->get("enable_rss_for_internal");
641 
642  if ($enable_internal_rss) {
643  $info->setBlockProperty("news", "settings", true);
644  $info->setBlockProperty("news", "public_notifications_option", true);
645  }
646  }
647 
648  // forward the command
649  if ($ilCtrl->getNextClass() === "ilinfoscreengui") {
650  $ilCtrl->forwardCommand($info);
651  } else {
652  return $ilCtrl->getHTML($info);
653  }
654  return "";
655  }
Class ilInfoScreenGUI.
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ infoScreenObject()

ilObjBookingPoolGUI::infoScreenObject ( )

this one is called from the info button in the repository

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

References ILIAS\Repository\ctrl(), and infoScreen().

613  : void
614  {
615  $this->ctrl->setCmd("showSummary");
616  $this->ctrl->setCmdClass("ilinfoscreengui");
617  $this->infoScreen();
618  }
+ Here is the call graph for this function:

◆ initCreationForms()

ilObjBookingPoolGUI::initCreationForms ( string  $new_type)
protected

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  $form)
protected

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

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

316  : void
317  {
318  $obj_service = $this->getObjectService();
319 
320  // Show didactic template type
321  $this->initDidacticTemplate($form);
322 
323  $type = new ilRadioGroupInputGUI($this->lng->txt("book_schedule_type"), "stype");
324  $type->setRequired(true);
325  $form->addItem($type);
326 
327  // #14478
328  if (count(ilBookingObject::getList($this->object->getId()))) {
329  $type->setDisabled(true);
330  }
331 
332  $fixed = new ilRadioOption($this->lng->txt("book_schedule_type_fixed"), ilObjBookingPool::TYPE_FIX_SCHEDULE);
333  $fixed->setInfo($this->lng->txt("book_schedule_type_fixed_info"));
334  $type->addOption($fixed);
335 
336  #23637
337  //period
338  $period = new ilNumberInputGUI($this->lng->txt("book_reservation_filter_period"), "period");
339  $period->setInfo($this->lng->txt("book_reservation_filter_period_info"));
340  $period->setSuffix($this->lng->txt("days"));
341  $period->setSize(3);
342  $period->setMinValue(0);
343  $fixed->addSubItem($period);
344 
345  // reminder
346  $rmd = new ilCheckboxInputGUI($this->lng->txt("book_reminder_setting"), "rmd");
347  $rmd->setChecked((bool) $this->object->getReminderStatus());
348  $info = $this->lng->txt("book_reminder_day_info");
349  if (!$this->cron_manager->isJobActive('book_notification')) {
350  $info .= " " . $this->lng->txt("book_notification_cron_not_active");
351  }
352  $rmd->setInfo($info);
353  $fixed->addSubItem($rmd);
354 
355  $rmd_day = new ilNumberInputGUI($this->lng->txt("book_reminder_day"), "rmd_day");
356  $rmd_day->setRequired(true);
357  $rmd_day->setSize(3);
358  $rmd_day->setSuffix($this->lng->txt("book_reminder_days"));
359  $rmd_day->setValue(max($this->object->getReminderDay(), 1));
360  $rmd_day->setMinValue(1);
361  $rmd->addSubItem($rmd_day);
362 
363  // no schedule, direct booking
364  $none = new ilRadioOption($this->lng->txt("book_schedule_type_none_direct"), ilObjBookingPool::TYPE_NO_SCHEDULE);
365  $none->setInfo($this->lng->txt("book_schedule_type_none_direct_info"));
366  $type->addOption($none);
367 
368  $limit = new ilNumberInputGUI($this->lng->txt("book_overall_limit"), "limit");
369  $limit->setSize(4);
370  $limit->setMinValue(1);
371  $limit->setSuffix($this->lng->txt("book_bookings_per_user"));
372  $none->addSubItem($limit);
373 
374  // no schedule, using preferences
375  $pref = new ilRadioOption($this->lng->txt("book_schedule_type_none_preference"), ilObjBookingPool::TYPE_NO_SCHEDULE_PREFERENCES);
376  $pref->setInfo($this->lng->txt("book_schedule_type_none_preference_info"));
377  $type->addOption($pref);
378 
379  $pref_options_disabled = false;
380  if ($this->object->getScheduleType() === ilObjBookingPool::TYPE_NO_SCHEDULE_PREFERENCES) {
381  $pref_manager = $this->domain->preferences($this->object);
382  $pref_options_disabled = $pref_manager->hasRun();
383  }
384 
385  // number of preferences
386  $pref_nr = new ilNumberInputGUI($this->lng->txt("book_nr_of_preferences"), "preference_nr");
387  $pref_nr->setSize(4);
388  $pref_nr->setMinValue(1);
389  $pref_nr->setInfo($this->lng->txt("book_nr_of_preferences_info"));
390  $pref_nr->setSuffix($this->lng->txt("book_nr_preferences"));
391  $pref_nr->setRequired(true);
392  $pref_nr->setDisabled($pref_options_disabled);
393  $pref->addSubItem($pref_nr);
394 
395  // preference deadline
396  $pref_deadline = new ilDateTimeInputGUI($this->lng->txt("book_pref_deadline"), "pref_deadline");
397  $pref_deadline->setInfo($this->lng->txt("book_pref_deadline_info"));
398  $pref_deadline->setShowTime(true);
399  $pref_deadline->setRequired(true);
400  $pref_deadline->setDisabled($pref_options_disabled);
401  $pref->addSubItem($pref_deadline);
402 
403 
404  $public = new ilCheckboxInputGUI($this->lng->txt("book_public_log"), "public");
405  $public->setInfo($this->lng->txt("book_public_log_info"));
406  $form->addItem($public);
407 
408  // messages
409  $mess = new ilCheckboxInputGUI($this->lng->txt("book_messages"), "messages");
410  $mess->setInfo($this->lng->txt("book_messages_info"));
411  $form->addItem($mess);
412 
413  $this->lng->loadLanguageModule("rep");
414  $section = new ilFormSectionHeaderGUI();
415  $section->setTitle($this->lng->txt('rep_activation_availability'));
416  $form->addItem($section);
417 
418  $online = new ilCheckboxInputGUI($this->lng->txt("online"), "online");
419  $form->addItem($online);
420 
421  // presentation
422  $pres = new ilFormSectionHeaderGUI();
423  $pres->setTitle($this->lng->txt('obj_presentation'));
424  $form->addItem($pres);
425 
426  // tile image
427  $obj_service->commonSettings()->legacyForm($form, $this->object)->addTileImage();
428 
429  // additional features
430  $feat = new ilFormSectionHeaderGUI();
431  $feat->setTitle($this->lng->txt('obj_features'));
432  $form->addItem($feat);
433  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setInfo(string $a_info)
This class represents a date/time property in a property form.
This class represents a property in a property form.
initDidacticTemplate(ilPropertyFormGUI $form)
static getList(int $a_pool_id, string $a_title=null)
Get list of booking objects.
+ Here is the call graph for this function:

◆ initHeaderAction()

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

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

References ilObjectGUI\$access, ilObjectGUI\$ctrl, ilObjectGUI\$lng, ilObjectGUI\$user, ilRBACAccessHandler\checkAccess(), ilObject\getId(), ilUtil\getImagePath(), ilCtrl\getLinkTarget(), ilNotification\hasNotification(), ilLanguage\loadLanguageModule(), ILIAS\Repository\object(), ilCtrl\setParameter(), ilLanguage\txt(), ilNotification\TYPE_BOOK, and ilObjBookingPool\TYPE_FIX_SCHEDULE.

681  : ?ilObjectListGUI
682  {
684  $user = $this->user;
685  $ctrl = $this->ctrl;
686  $lng = $this->lng;
687 
688  $lng->loadLanguageModule("noti");
689 
690  $lg = parent::initHeaderAction($sub_type, $sub_id);
691 
692  if ($lg && $access->checkAccess("read", "", $this->ref_id)) {
693  if ($this->object->getScheduleType() === ilObjBookingPool::TYPE_FIX_SCHEDULE &&
694  $this->object->getReminderStatus()) {
695  // notification
698  $user->getId(),
699  $this->object->getId()
700  )) {
701  $lg->addHeaderIcon(
702  "not_icon",
703  ilUtil::getImagePath("object/notification_off.svg"),
704  $lng->txt("noti_notification_deactivated")
705  );
706 
707  $ctrl->setParameter($this, "ntf", 1);
708  $caption = "noti_activate_notification";
709  } else {
710  $lg->addHeaderIcon(
711  "not_icon",
712  ilUtil::getImagePath("object/notification_on.svg"),
713  $lng->txt("noti_notification_activated")
714  );
715 
716  $ctrl->setParameter($this, "ntf", 0);
717  $caption = "noti_deactivate_notification";
718  }
719 
720  $lg->addCustomCommand(
721  $ctrl->getLinkTarget($this, "saveNotification"),
722  $caption
723  );
724 
725  $ctrl->setParameter($this, "ntf", "");
726  }
727  }
728 
729  return $lg;
730  }
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...
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) ...
static getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
loadLanguageModule(string $a_module)
Load language module.
ilLanguage $lng
getLinkTarget(object $a_gui_obj, string $a_cmd=null, string $a_anchor=null, bool $is_async=false, bool $has_xml_style=false)
ilAccessHandler $access
static hasNotification(int $type, int $user_id, int $id)
Check notification status for object and user.
setParameter(object $a_gui_obj, string $a_parameter, $a_value)
+ Here is the call graph for this function:

◆ saveNotificationObject()

ilObjBookingPoolGUI::saveNotificationObject ( )

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

References ilObjectGUI\$ctrl, ilObjectGUI\$user, ilObject\getId(), ilCtrl\redirect(), ilNotification\setNotification(), and ilNotification\TYPE_BOOK.

732  : void
733  {
734  $ctrl = $this->ctrl;
735  $user = $this->user;
736 
737 
738  switch ($this->book_request->getNotification()) {
739  case 0:
740  ilNotification::setNotification(ilNotification::TYPE_BOOK, $user->getId(), $this->object->getId(), false);
741  break;
742 
743  case 1:
744  ilNotification::setNotification(ilNotification::TYPE_BOOK, $user->getId(), $this->object->getId(), true);
745  break;
746  }
747  $ctrl->redirect($this, "render");
748  }
redirect(object $a_gui_obj, string $a_cmd=null, string $a_anchor=null, bool $is_async=false)
static setNotification(int $type, int $user_id, int $id, bool $status=true)
Set notification status for object and user.
+ Here is the call graph for this function:

◆ showNoScheduleMessage()

ilObjBookingPoolGUI::showNoScheduleMessage ( )

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

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

Referenced by editObject().

304  : void
305  {
306  $schedule_manager = $this->domain->schedules($this->object->getId());
307 
308  // if we have no schedules yet - show info
309  if ($this->object->getScheduleType() === ilObjBookingPool::TYPE_FIX_SCHEDULE &&
310  !$schedule_manager->hasSchedules()) {
311  $this->tpl->setOnScreenMessage('info', $this->lng->txt("book_schedule_warning_edit"));
312  }
313  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showProfileObject()

ilObjBookingPoolGUI::showProfileObject ( )

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

References ilObjectGUI\$ctrl, $profile_user_id, ilObjectGUI\$tpl, ILIAS\Repository\ctrl(), and ilGlobalTemplateInterface\setContent().

658  : void
659  {
660  $tpl = $this->tpl;
661  $ilCtrl = $this->ctrl;
662 
663  $this->tabs_gui->clearTargets();
664 
665  $user_id = $this->profile_user_id;
666 
667  $profile = new ilPublicUserProfileGUI($user_id);
668  $profile->setBackUrl($this->ctrl->getLinkTarget($this, 'log'));
669  $tpl->setContent($ilCtrl->getHTML($profile));
670  }
GUI class for public user profile presentation.
ilGlobalTemplateInterface $tpl
setContent(string $a_html)
Sets content for standard template.
+ Here is the call graph for this function:

◆ updateCustom()

ilObjBookingPoolGUI::updateCustom ( ilPropertyFormGUI  $form)
protected

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

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

452  : void
453  {
454  $obj_service = $this->getObjectService();
455 
456  $pref_deadline = $form->getItemByPostVar("pref_deadline");
457  if ($pref_deadline !== null) {
458  $pref_deadline = $pref_deadline->getDate();
459  $pref_deadline = $pref_deadline
460  ? $pref_deadline->get(IL_CAL_UNIX)
461  : 0;
462 
463  $this->object->setOffline(!$form->getInput('online'));
464  $this->object->setReminderStatus((int) $form->getInput('rmd'));
465  $this->object->setReminderDay($form->getInput('rmd_day'));
466  $this->object->setPublicLog($form->getInput('public'));
467  $this->object->setScheduleType($form->getInput('stype'));
468  $this->object->setMessages((bool) (int) $form->getInput('messages'));
469  $this->object->setOverallLimit($form->getInput('limit') ?: null);
470  $this->object->setReservationFilterPeriod($form->getInput('period') != '' ? (int) $form->getInput('period') : null);
471  $this->object->setPreferenceDeadline($pref_deadline);
472  $this->object->setPreferenceNumber($form->getInput('preference_nr'));
473 
474  // tile image
475  $obj_service->commonSettings()->legacyForm($form, $this->object)->saveTileImage();
476 
478  $this->object->getId(),
479  $form,
481  );
482  }
483  }
getItemByPostVar(string $a_post_var)
static updateServiceSettingsForm(int $obj_id, ilPropertyFormGUI $form, array $services)
const IL_CAL_UNIX
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-...
+ 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.

Referenced by showProfileObject().

◆ $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: