ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilObjBookingPoolGUI Class Reference

@ilCtrl_Calls ilObjBookingPoolGUI: ilPermissionGUI, ilBookingObjectGUI @ilCtrl_Calls ilObjBookingPoolGUI: ilBookingScheduleGUI, ilInfoScreenGUI, ILIAS\User\Profile\PublicProfileGUI @ilCtrl_Calls ilObjBookingPoolGUI: ilCommonActionDispatcherGUI, ilObjectCopyGUI, ilObjectMetaDataGUI @ilCtrl_Calls ilObjBookingPoolGUI: ilBookingParticipantGUI, ilBookingReservationsGUI, ilBookingPreferencesGUI @ilCtrl_Calls ilObjBookingPoolGUI: ILIAS\BookingManager\Settings\SettingsGUI @ilCtrl_IsCalledBy ilObjBookingPoolGUI: ilRepositoryGUI, ilAdministrationGUI 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
 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)
 
 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

 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...
 
 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 ()
 
 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...
 
 getCreationFormsHTML (StandardForm|ilPropertyFormGUI|array $form)
 
 getTitleForCreationFormPage ()
 
 getCreationFormTitle ()
 
 initCreateForm (string $new_type)
 
 didacticTemplatesToForm ()
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 
 retrieveAdditionalDidacticTemplateOptions ()
 
 addAdoptContentLinkToToolbar ()
 
 addImportButtonToToolbar ()
 
 addAvailabilityPeriodButtonToToolbar (ilToolbarGUI $toolbar)
 
 parseDidacticTemplateVar (string $var, string $type)
 
 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...
 
 routeImportCmdObject ()
 
 importFile (string $file_to_import, string $path_to_uploaded_file_in_temp_dir)
 
 deleteUploadedImportFile (string $path_to_uploaded_file_in_temp_dir)
 
 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...
 
 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...
 
 getCreatableObjectTypes ()
 
 buildAddNewItemElements (array $subtypes, string $create_target_class=ilRepositoryGUI::class, ?int $redirect_target_ref_id=null,)
 
 buildGroup (string $create_target_class, array $obj_types_in_group, string $title, array $subtypes)
 

Protected Attributes

InternalGUIService $gui
 
InternalDomainService $domain
 
ILIAS Cron Job JobManager $cron_manager
 
StandardGUIRequest $book_request
 
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
 
GlobalHttpState $http
 
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
 
Refinery $refinery
 
ilFavouritesManager $favourites
 
CustomIconFactory $custom_icon_factory
 
UIFactory $ui_factory
 
UIRenderer $ui_renderer
 
Filesystem $temp_file_system
 
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 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
 
const SUPPORTED_IMPORT_MIME_TYPES = [MimeType::APPLICATION__ZIP, MimeType::APPLICATION__X_ZIP_COMPRESSED]
 

Detailed Description

Member Function Documentation

◆ _goto()

static ilObjBookingPoolGUI::_goto ( string  $a_target)
static

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

522 : void
523 {
524 global $DIC;
525 $main_tpl = $DIC->ui()->mainTemplate();
526
527 $ilAccess = $DIC->access();
528 $lng = $DIC->language();
529
530 if ($ilAccess->checkAccess("read", "", $a_target)) {
531 ilObjectGUI::_gotoRepositoryNode($a_target, "render");
532 } elseif ($ilAccess->checkAccess("visible", "", $a_target)) {
533 ilObjectGUI::_gotoRepositoryNode($a_target, "infoScreen");
534 } elseif ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID)) {
535 $main_tpl->setOnScreenMessage('failure', sprintf(
536 $lng->txt("msg_no_perm_read_item"),
538 ), true);
540 }
541 }
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: shib_login.php:26

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

+ Here is the call graph for this function:

◆ addExternalEditFormCustom()

ilObjBookingPoolGUI::addExternalEditFormCustom ( ilPropertyFormGUI  $form)

Reimplemented from ilObjectGUI.

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

411 : void
412 {
414 $this->object->getId(),
415 $form,
417 );
418 }
static initServiceSettingsForm(int $obj_id, ilPropertyFormGUI $form, array $services)

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

+ Here is the call 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 603 of file class.ilObjBookingPoolGUI.php.

603 : void
604 {
605 $ilLocator = $this->locator;
606
607 if (is_object($this->object)) {
608 $ilLocator->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this, "render"), "", $this->object->getRefId());
609 }
610 }
ilLocatorGUI $locator

References ilObjectGUI\$locator, and 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 257 of file class.ilObjBookingPoolGUI.php.

257 : void
258 {
259 $new_object->update();
260
261 // always send a message
262 $this->tpl->setOnScreenMessage('success', $this->lng->txt("book_pool_added"), true);
263 $this->ctrl->setParameter($this, "ref_id", $new_object->getRefId());
264 $this->ctrl->redirect($this, "edit");
265 }

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 267 of file class.ilObjBookingPoolGUI.php.

267 : void
268 {
269 // check if template is changed
271 $this->object->getRefId()
272 );
273 $new_tpl_id = $this->getDidacticTemplateVar('dtpl');
274
275 if ($new_tpl_id !== $current_tpl_id) {
276 // redirect to didactic template confirmation
277 $this->ctrl->redirect(ilDidacticTemplateGUI::class, "confirmTemplateSwitch");
278 return;
279 }
280 parent::afterUpdate();
281 }
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 283 of file class.ilObjBookingPoolGUI.php.

283 : void
284 {
285 $this->ctrl->redirectByClass(SettingsGUI::class, "");
286 }

References ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ infoScreen()

ilObjBookingPoolGUI::infoScreen ( )

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

551 : string
552 {
553 $ilCtrl = $this->ctrl;
554
555 $this->tabs_gui->setTabActive('info');
556
557 $this->checkPermission("visible");
558
559 $info = new ilInfoScreenGUI($this);
560
561 $info->enablePrivateNotes();
562
563 if ($this->checkPermissionBool("read")) {
564 $info->enableNews();
565 }
566
567 // no news editing for files, just notifications
568 $info->enableNewsEditing(false);
569 if ($this->checkPermissionBool("write")) {
570 $news_set = new ilSetting("news");
571 $enable_internal_rss = $news_set->get("enable_rss_for_internal");
572
573 if ($enable_internal_rss) {
574 $info->setBlockProperty("news", "settings", true);
575 $info->setBlockProperty("news", "public_notifications_option", true);
576 }
577 }
578
579 // forward the command
580 if ($ilCtrl->getNextClass() === "ilinfoscreengui") {
581 $ilCtrl->forwardCommand($info);
582 } else {
583 return $ilCtrl->getHTML($info);
584 }
585 return "";
586 }
Class ilInfoScreenGUI.
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
ILIAS Setting Class.
$info
Definition: entry_point.php:21

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

+ Here is the call graph for this function:

◆ infoScreenObject()

ilObjBookingPoolGUI::infoScreenObject ( )

this one is called from the info button in the repository

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

546 : void
547 {
548 $this->ctrl->redirectByClass(ilInfoScreenGUI::class, "showSummary");
549 }

References ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ initEditCustomForm()

ilObjBookingPoolGUI::initEditCustomForm ( ilPropertyFormGUI  $a_form)
protected

Add custom fields to update form.

Reimplemented from ilObjectGUI.

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

300 : void
301 {
302 $obj_service = $this->getObjectService();
303
304 // Show didactic template type
305 $this->initDidacticTemplate($form);
306
307 $type = new ilRadioGroupInputGUI($this->lng->txt("book_schedule_type"), "stype");
308 $type->setRequired(true);
309 $form->addItem($type);
310
311 // #14478
312 if (count(ilBookingObject::getList($this->object->getId()))) {
313 $type->setDisabled(true);
314 }
315
316 $fixed = new ilRadioOption($this->lng->txt("book_schedule_type_fixed"), ilObjBookingPool::TYPE_FIX_SCHEDULE);
317 $fixed->setInfo($this->lng->txt("book_schedule_type_fixed_info"));
318 $type->addOption($fixed);
319
320 #23637
321 //period
322 $period = new ilNumberInputGUI($this->lng->txt("book_reservation_filter_period"), "period");
323 $period->setInfo($this->lng->txt("book_reservation_filter_period_info"));
324 $period->setSuffix($this->lng->txt("days"));
325 $period->setSize(3);
326 $period->setMinValue(0);
327 $fixed->addSubItem($period);
328
329 // reminder
330 $rmd = new ilCheckboxInputGUI($this->lng->txt("book_reminder_setting"), "rmd");
331 $rmd->setChecked((bool) $this->object->getReminderStatus());
332 $info = $this->lng->txt("book_reminder_day_info");
333 if (!$this->cron_manager->isJobActive('book_notification')) {
334 $info .= " " . $this->lng->txt("book_notification_cron_not_active");
335 }
336 $rmd->setInfo($info);
337 $fixed->addSubItem($rmd);
338
339 $rmd_day = new ilNumberInputGUI($this->lng->txt("book_reminder_day"), "rmd_day");
340 $rmd_day->setRequired(true);
341 $rmd_day->setSize(3);
342 $rmd_day->setSuffix($this->lng->txt("book_reminder_days"));
343 $rmd_day->setValue(max($this->object->getReminderDay(), 1));
344 $rmd_day->setMinValue(1);
345 $rmd->addSubItem($rmd_day);
346
347 // no schedule, direct booking
348 $none = new ilRadioOption($this->lng->txt("book_schedule_type_none_direct"), ilObjBookingPool::TYPE_NO_SCHEDULE);
349 $none->setInfo($this->lng->txt("book_schedule_type_none_direct_info"));
350 $type->addOption($none);
351
352 $limit = new ilNumberInputGUI($this->lng->txt("book_overall_limit"), "limit");
353 $limit->setSize(4);
354 $limit->setMinValue(1);
355 $limit->setSuffix($this->lng->txt("book_bookings_per_user"));
356 $none->addSubItem($limit);
357
358 // no schedule, using preferences
359 $pref = new ilRadioOption($this->lng->txt("book_schedule_type_none_preference"), ilObjBookingPool::TYPE_NO_SCHEDULE_PREFERENCES);
360 $pref->setInfo($this->lng->txt("book_schedule_type_none_preference_info"));
361 $type->addOption($pref);
362
363 // number of preferences
364 $pref_nr = new ilNumberInputGUI($this->lng->txt("book_nr_of_preferences"), "preference_nr");
365 $pref_nr->setSize(4);
366 $pref_nr->setMinValue(1);
367 $pref_nr->setInfo($this->lng->txt("book_nr_of_preferences_info"));
368 $pref_nr->setSuffix($this->lng->txt("book_nr_preferences"));
369 $pref_nr->setRequired(true);
370 $pref->addSubItem($pref_nr);
371
372 // preference deadline
373 $pref_deadline = new ilDateTimeInputGUI($this->lng->txt("book_pref_deadline"), "pref_deadline");
374 $pref_deadline->setInfo($this->lng->txt("book_pref_deadline_info"));
375 $pref_deadline->setShowTime(true);
376 $pref_deadline->setRequired(true);
377 $pref->addSubItem($pref_deadline);
378
379
380 $public = new ilCheckboxInputGUI($this->lng->txt("book_public_log"), "public");
381 $public->setInfo($this->lng->txt("book_public_log_info"));
382 $form->addItem($public);
383
384 // messages
385 $mess = new ilCheckboxInputGUI($this->lng->txt("book_messages"), "messages");
386 $mess->setInfo($this->lng->txt("book_messages_info"));
387 $form->addItem($mess);
388
389 $this->lng->loadLanguageModule("rep");
390 $section = new ilFormSectionHeaderGUI();
391 $section->setTitle($this->lng->txt('rep_activation_availability'));
392 $form->addItem($section);
393
394 $online = new ilCheckboxInputGUI($this->lng->txt("online"), "online");
395 $form->addItem($online);
396
397 // presentation
398 $pres = new ilFormSectionHeaderGUI();
399 $pres->setTitle($this->lng->txt('obj_presentation'));
400 $form->addItem($pres);
401
402 // tile image
403 $obj_service->commonSettings()->legacyForm($form, $this->object)->addTileImage();
404
405 // additional features
406 $feat = new ilFormSectionHeaderGUI();
407 $feat->setTitle($this->lng->txt('obj_features'));
408 $form->addItem($feat);
409 }
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 class represents a date/time property in a property form.
This class represents a section header in a property form.
This class represents a number property in a property form.
initDidacticTemplate(ilPropertyFormGUI $form)
This class represents a property in a property form.
This class represents an option in a radio group.

References $info, 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 612 of file class.ilObjBookingPoolGUI.php.

613 {
618
619 $lng->loadLanguageModule("noti");
620
621 $lg = parent::initHeaderAction($sub_type, $sub_id);
622
623 if ($lg && $access->checkAccess("read", "", $this->ref_id)) {
624 if ($this->object->getScheduleType() === ilObjBookingPool::TYPE_FIX_SCHEDULE &&
625 $this->object->getReminderStatus()) {
626 // notification
629 $user->getId(),
630 $this->object->getId()
631 )) {
632 $lg->addHeaderIcon(
633 "not_icon",
634 ilUtil::getImagePath("object/notification_off.svg"),
635 $lng->txt("noti_notification_deactivated")
636 );
637
638 $ctrl->setParameter($this, "ntf", 1);
639 $caption = "noti_activate_notification";
640 } else {
641 $lg->addHeaderIcon(
642 "not_icon",
643 ilUtil::getImagePath("object/notification_on.svg"),
644 $lng->txt("noti_notification_activated")
645 );
646
647 $ctrl->setParameter($this, "ntf", 0);
648 $caption = "noti_deactivate_notification";
649 }
650
651 $lg->addCustomCommand(
652 $ctrl->getLinkTarget($this, "saveNotification"),
653 $caption
654 );
655
656 $ctrl->setParameter($this, "ntf", "");
657 }
658 }
659
660 return $lg;
661 }
getLinkTarget(object $a_gui_obj, ?string $a_cmd=null, ?string $a_anchor=null, bool $is_async=false, bool $has_xml_style=false)
@inheritDoc
setParameter(object $a_gui_obj, string $a_parameter, $a_value)
@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 $image_name, 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 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.

+ Here is the call graph for this function:

◆ saveNotificationObject()

ilObjBookingPoolGUI::saveNotificationObject ( )

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

663 : void
664 {
667
668
669 switch ($this->book_request->getNotification()) {
670 case 0:
671 ilNotification::setNotification(ilNotification::TYPE_BOOK, $user->getId(), $this->object->getId(), false);
672 break;
673
674 case 1:
675 ilNotification::setNotification(ilNotification::TYPE_BOOK, $user->getId(), $this->object->getId(), true);
676 break;
677 }
678 $ctrl->redirect($this, "render");
679 }
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 ilObjectGUI\$ctrl, ilObjectGUI\$user, ilObject\getId(), ilCtrl\redirect(), ilNotification\setNotification(), and ilNotification\TYPE_BOOK.

+ Here is the call graph for this function:

◆ showNoScheduleMessage()

ilObjBookingPoolGUI::showNoScheduleMessage ( )

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

288 : void
289 {
290 $schedule_manager = $this->domain->schedules($this->object->getId());
291
292 // if we have no schedules yet - show info
293 if ($this->object->getScheduleType() === ilObjBookingPool::TYPE_FIX_SCHEDULE &&
294 !$schedule_manager->hasSchedules()) {
295 $this->tpl->setOnScreenMessage('info', $this->lng->txt("book_schedule_warning_edit"));
296 }
297 }

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

+ Here is the call graph for this function:

◆ showProfileObject()

ilObjBookingPoolGUI::showProfileObject ( )

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

589 : void
590 {
592 $ilCtrl = $this->ctrl;
593
594 $this->tabs_gui->clearTargets();
595
597
598 $profile = new PublicProfileGUI($user_id);
599 $profile->setBackUrl($this->ctrl->getLinkTarget($this, 'log'));
600 $tpl->setContent($ilCtrl->getHTML($profile));
601 }
GUI class for public user profile presentation.
ilGlobalTemplateInterface $tpl
setContent(string $a_html)
Sets content for standard template.

References ilObjectGUI\$ctrl, $profile_user_id, ilObjectGUI\$tpl, $user_id, ILIAS\Repository\ctrl(), and ILIAS\UICore\GlobalTemplate\setContent().

+ Here is the call graph for this function:

Field Documentation

◆ $book_obj_id

int ilObjBookingPoolGUI::$book_obj_id
protected

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

◆ $book_request

StandardGUIRequest ilObjBookingPoolGUI::$book_request
protected

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

◆ $cron_manager

ILIAS Cron Job JobManager ilObjBookingPoolGUI::$cron_manager
protected

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

◆ $domain

InternalDomainService ilObjBookingPoolGUI::$domain
protected

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

◆ $gui

InternalGUIService ilObjBookingPoolGUI::$gui
protected

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

◆ $help

ilBookingHelpAdapter ilObjBookingPoolGUI::$help
protected

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

◆ $nav_history

ilNavigationHistory ilObjBookingPoolGUI::$nav_history
protected

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

◆ $profile_user_id

int ilObjBookingPoolGUI::$profile_user_id
protected

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

Referenced by showProfileObject().

◆ $reservation_id

string ilObjBookingPoolGUI::$reservation_id
protected

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

◆ $seed

string ilObjBookingPoolGUI::$seed
protected

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

◆ $service

InternalService ilObjBookingPoolGUI::$service
protected

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

◆ $sseed

string ilObjBookingPoolGUI::$sseed
protected

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

◆ $tabs

ilTabsGUI ilObjBookingPoolGUI::$tabs
protected

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

◆ $user_id_assigner

int ilObjBookingPoolGUI::$user_id_assigner
protected

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

◆ $user_id_to_book

int ilObjBookingPoolGUI::$user_id_to_book
protected

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


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