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

Repository settings. More...

+ Inheritance diagram for ilObjRepositorySettingsGUI:
+ Collaboration diagram for ilObjRepositorySettingsGUI:

Public Member Functions

 __construct ( $a_data, int $a_id, bool $a_call_by_reference=true, bool $a_prepare_output=true)
 
 executeCommand ()
 
 getAdminTabs ()
 administration tabs show only permissions and trash folder More...
 
 view (?StandardForm $a_form=null)
 
 saveSettings ()
 
 customIcons (?StandardForm $a_form=null)
 
 saveCustomIcons ()
 
 addToExternalSettingsForm (int $a_form_id)
 
- 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)
 

Protected Member Functions

 initSettingsForm ()
 
 initCustomIconsForm ()
 
 setModuleSubTabs (string $a_active)
 
 listModules ()
 
 saveModules ()
 
 listNewItemGroups ()
 
 initNewItemGroupForm (int $a_grp_id=0)
 
 addNewItemGroup (?ilPropertyFormGUI $a_form=null)
 
 saveNewItemGroup ()
 
 editNewItemGroup (?ilPropertyFormGUI $a_form=null)
 
 updateNewItemGroup ()
 
 saveNewItemGroupOrder ()
 
 confirmDeleteNewItemGroup ()
 
 deleteNewItemGroup ()
 
 getMaxLengthConstraint (int $max_length)
 
 getPositiveConstraint ()
 
 getNonNegativeConstraint ()
 
- 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

ilRbacSystem $rbacsystem
 
AdministrationGUIRequest $admin_gui_request
 
ilErrorHandling $error
 
ilSetting $folder_settings
 
UIFactory $factory
 
UIRenderer $renderer
 
RefFactory $refinery
 
- 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

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

Repository settings.

Author
Jörg Lützenkirchen luetz.nosp@m.enki.nosp@m.rchen.nosp@m.@lei.nosp@m.fos.c.nosp@m.om @ilCtrl_Calls ilObjRepositorySettingsGUI: ilPermissionGUI

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

Constructor & Destructor Documentation

◆ __construct()

ilObjRepositorySettingsGUI::__construct (   $a_data,
int  $a_id,
bool  $a_call_by_reference = true,
bool  $a_prepare_output = true 
)

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

50 {
51 global $DIC;
52
53 $this->error = $DIC["ilErr"];
54 $this->access = $DIC->access();
55 $this->rbacsystem = $DIC->rbac()->system();
56 $this->settings = $DIC->settings();
57 $this->folder_settings = new ilSetting('fold');
58 $this->ctrl = $DIC->ctrl();
59 $this->lng = $DIC->language();
60 $this->toolbar = $DIC->toolbar();
61 $this->factory = $DIC->ui()->factory();
62 $this->renderer = $DIC->ui()->renderer();
63 $this->refinery = $DIC->refinery();
64 parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
65
66 $this->type = 'reps';
67 $this->lng->loadLanguageModule('rep');
68 $this->lng->loadLanguageModule('cmps');
69
70 $this->admin_gui_request = $DIC
71 ->repository()
72 ->internal()
73 ->gui()
74 ->administration()
75 ->request();
76 }
renderer()
factory()
error(string $a_errmsg)
ILIAS Setting Class.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $DIC
Definition: shib_login.php:26

References $DIC, ILIAS\GlobalScreen\Provider\__construct(), ILIAS\Repository\access(), ILIAS\Repository\ctrl(), error(), factory(), ILIAS\Repository\lng(), ILIAS\Repository\refinery(), renderer(), ILIAS\Repository\settings(), and ILIAS\Repository\toolbar().

+ Here is the call graph for this function:

Member Function Documentation

◆ addNewItemGroup()

ilObjRepositorySettingsGUI::addNewItemGroup ( ?ilPropertyFormGUI  $a_form = null)
protected

Definition at line 736 of file class.ilObjRepositorySettingsGUI.php.

736 : void
737 {
738 if (!$a_form) {
739 $a_form = $this->initNewItemGroupForm();
740 }
741
742 $this->tpl->setContent($a_form->getHTML());
743 }

References initNewItemGroupForm().

Referenced by saveNewItemGroup(), and updateNewItemGroup().

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

◆ addToExternalSettingsForm()

ilObjRepositorySettingsGUI::addToExternalSettingsForm ( int  $a_form_id)

Definition at line 880 of file class.ilObjRepositorySettingsGUI.php.

880 : ?array
881 {
883
884 switch ($a_form_id) {
886
887 $fields = ['trac_show_repository_views' => [ilChangeEvent::_isActive(), ilAdministrationSettingsFormHandler::VALUE_BOOL]];
888
889 return [["view", $fields]];
890
891
893
894 $fields = [
895 'adm_show_comments_tagging_in_lists' => [
896 $ilSetting->get('comments_tagging_in_lists'), ilAdministrationSettingsFormHandler::VALUE_BOOL,
897 ['adm_show_comments_tagging_in_lists_tags' => [$ilSetting->get('comments_tagging_in_lists_tags'), ilAdministrationSettingsFormHandler::VALUE_BOOL]]
898 ]
899 ];
900
901 return [["view", $fields]];
902 }
903 return null;
904 }
static _isActive()
Returns true, if change event tracking is active.
ilSetting $settings
global $ilSetting
Definition: privfeed.php:31

References $ilSetting, ilObjectGUI\$settings, ilChangeEvent\_isActive(), ilAdministrationSettingsFormHandler\FORM_LP, ilAdministrationSettingsFormHandler\FORM_TAGGING, and ilAdministrationSettingsFormHandler\VALUE_BOOL.

+ Here is the call graph for this function:

◆ confirmDeleteNewItemGroup()

ilObjRepositorySettingsGUI::confirmDeleteNewItemGroup ( )
protected

Definition at line 837 of file class.ilObjRepositorySettingsGUI.php.

837 : void
838 {
839 $group_ids = $this->admin_gui_request->getNewItemGroupIds();
840 if (count($group_ids) === 0) {
841 $this->tpl->setOnScreenMessage('failure', $this->lng->txt("select_one"));
842 $this->listNewItemGroups();
843 return;
844 }
845
846 $this->setModuleSubTabs("new_item_groups");
847
848 $cgui = new ilConfirmationGUI();
849 $cgui->setHeaderText($this->lng->txt("rep_new_item_group_delete_sure"));
850
851 $cgui->setFormAction($this->ctrl->getFormAction($this));
852 $cgui->setCancel($this->lng->txt("cancel"), "listNewItemGroups");
853 $cgui->setConfirm($this->lng->txt("confirm"), "deleteNewItemGroup");
854
856
857 foreach ($group_ids as $grp_id) {
858 $cgui->addItem("grp_ids[]", (string) $grp_id, $groups[$grp_id]["title"]);
859 }
860
861 $this->tpl->setContent($cgui->getHTML());
862 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

References ILIAS\Repository\ctrl(), ilObjRepositorySettings\getNewItemGroups(), listNewItemGroups(), ILIAS\Repository\lng(), and setModuleSubTabs().

+ Here is the call graph for this function:

◆ customIcons()

ilObjRepositorySettingsGUI::customIcons ( ?StandardForm  $a_form = null)

Definition at line 516 of file class.ilObjRepositorySettingsGUI.php.

516 : void
517 {
518 $this->tabs_gui->activateTab("icons");
519
520 if (!$a_form) {
521 $a_form = $this->initCustomIconsForm();
522 }
523
524 $this->tpl->setContent($this->renderer->render($a_form));
525 }

References initCustomIconsForm(), and renderer().

Referenced by saveCustomIcons().

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

◆ deleteNewItemGroup()

ilObjRepositorySettingsGUI::deleteNewItemGroup ( )
protected

Definition at line 864 of file class.ilObjRepositorySettingsGUI.php.

864 : void
865 {
866 $group_ids = $this->admin_gui_request->getNewItemGroupIds();
867 if (count($group_ids) === 0) {
868 $this->listNewItemGroups();
869 return;
870 }
871
872 foreach ($group_ids as $grp_id) {
874 }
875
876 $this->tpl->setOnScreenMessage('success', $this->lng->txt("settings_saved"), true);
877 $this->ctrl->redirect($this, "listNewItemGroups");
878 }

References ILIAS\Repository\ctrl(), ilObjRepositorySettings\deleteNewItemGroup(), listNewItemGroups(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ editNewItemGroup()

ilObjRepositorySettingsGUI::editNewItemGroup ( ?ilPropertyFormGUI  $a_form = null)
protected

Definition at line 764 of file class.ilObjRepositorySettingsGUI.php.

764 : void
765 {
766 $grp_id = $this->admin_gui_request->getNewItemGroupId();
767 if (!$grp_id) {
768 $this->ctrl->redirect($this, "listNewItemGroups");
769 }
770
771 if (!$a_form) {
772 $this->ctrl->setParameter($this, "grp_id", $grp_id);
773 $a_form = $this->initNewItemGroupForm($grp_id);
774 }
775
776 $this->tpl->setContent($a_form->getHTML());
777 }

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

+ Here is the call graph for this function:

◆ executeCommand()

ilObjRepositorySettingsGUI::executeCommand ( )

Reimplemented from ilObjectGUI.

Definition at line 78 of file class.ilObjRepositorySettingsGUI.php.

78 : void
79 {
81 $ilAccess = $this->access;
82
83 $next_class = $this->ctrl->getNextClass($this);
84 $cmd = $this->ctrl->getCmd();
85
86 $this->prepareOutput();
87
88 if (!$ilAccess->checkAccess('read', '', $this->object->getRefId())) {
89 $ilErr->raiseError($this->lng->txt('no_permission'), $ilErr->WARNING);
90 }
91
92 switch ($next_class) {
93 case 'ilpermissiongui':
94 $this->tabs_gui->setTabActive('perm_settings');
95 $perm_gui = new ilPermissionGUI($this);
96 $this->ctrl->forwardCommand($perm_gui);
97 break;
98
99 default:
100 $this->$cmd();
101 break;
102 }
103 }
ilAccessHandler $access
prepareOutput(bool $show_sub_objects=true)
$ilErr
Definition: raiseError.php:33

References ilObjectGUI\$access, $error, $ilErr, ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), and ilObjectGUI\prepareOutput().

+ Here is the call graph for this function:

◆ getAdminTabs()

ilObjRepositorySettingsGUI::getAdminTabs ( )

administration tabs show only permissions and trash folder

Reimplemented from ilObjectGUI.

Definition at line 105 of file class.ilObjRepositorySettingsGUI.php.

105 : void
106 {
108
109 $this->tabs_gui->addTab(
110 "settings",
111 $this->lng->txt("settings"),
112 $this->ctrl->getLinkTarget($this, "view")
113 );
114
115 $this->tabs_gui->addTab(
116 "icons",
117 $this->lng->txt("rep_custom_icons"),
118 $this->ctrl->getLinkTarget($this, "customIcons")
119 );
120
121 $this->tabs_gui->addTab(
122 "modules",
123 $this->lng->txt("cmps_repository_object_types"),
124 $this->ctrl->getLinkTarget($this, "listModules")
125 );
126
127 if ($rbacsystem->checkAccess('edit_permission', $this->object->getRefId())) {
128 $this->tabs_gui->addTab(
129 "perm_settings",
130 $this->lng->txt("perm_settings"),
131 $this->ctrl->getLinkTargetByClass('ilpermissiongui', "perm")
132 );
133 }
134 }
checkAccess(string $a_operations, int $a_ref_id, string $a_type="")
checkAccess represents the main method of the RBAC-system in ILIAS3 developers want to use With this ...

References $rbacsystem, ilRbacSystem\checkAccess(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ getMaxLengthConstraint()

ilObjRepositorySettingsGUI::getMaxLengthConstraint ( int  $max_length)
protected

Definition at line 906 of file class.ilObjRepositorySettingsGUI.php.

906 : Constraint
907 {
908 //This gives max_length many 9's in a row (and 0 for non-positive max_length)
909 //The int cast is necessary for negative max_length
910 $bound = (int) (10 ** $max_length - 1);
911
912 return $this->refinery->int()->isLessThanOrEqual($bound);
913 }
A constraint encodes some resrtictions on values.
Definition: Constraint.php:32

References ILIAS\Repository\int(), and ILIAS\Repository\refinery().

Referenced by initSettingsForm().

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

◆ getNonNegativeConstraint()

ilObjRepositorySettingsGUI::getNonNegativeConstraint ( )
protected

Definition at line 920 of file class.ilObjRepositorySettingsGUI.php.

920 : Constraint
921 {
922 return $this->refinery->int()->isGreaterThanOrEqual(0);
923 }

References ILIAS\Repository\refinery().

Referenced by initSettingsForm().

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

◆ getPositiveConstraint()

ilObjRepositorySettingsGUI::getPositiveConstraint ( )
protected

Definition at line 915 of file class.ilObjRepositorySettingsGUI.php.

915 : Constraint
916 {
917 return $this->refinery->int()->isGreaterThan(0);
918 }

References ILIAS\Repository\refinery().

Referenced by initSettingsForm().

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

◆ initCustomIconsForm()

ilObjRepositorySettingsGUI::initCustomIconsForm ( )
protected

Definition at line 527 of file class.ilObjRepositorySettingsGUI.php.

527 : StandardForm
528 {
530 $ilAccess = $this->access;
531
532 $cb = $this->factory->input()->field()->checkbox(
533 $this->lng->txt("enable_custom_icons"),
534 $this->lng->txt("enable_custom_icons_info")
535 )->withValue((bool) $ilSetting->get("custom_icons"));
536
537 $section = $this->factory->input()->field()->section(
538 ['custom_icons' => $cb],
539 $this->lng->txt("rep_custom_icons")
540 )->withDisabled(
541 !$ilAccess->checkAccess('write', '', $this->object->getRefId())
542 );
543
544 $form = $this->factory->input()->container()->form()->standard(
545 $this->ctrl->getFormAction($this, 'saveCustomIcons'),
546 ['section' => $section]
547 );
548
549 return $form;
550 }

References ilObjectGUI\$access, $ilSetting, ilObjectGUI\$settings, ILIAS\Repository\ctrl(), factory(), and ILIAS\Repository\lng().

Referenced by customIcons(), and saveCustomIcons().

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

◆ initNewItemGroupForm()

ilObjRepositorySettingsGUI::initNewItemGroupForm ( int  $a_grp_id = 0)
protected

Definition at line 687 of file class.ilObjRepositorySettingsGUI.php.

688 {
689 $this->setModuleSubTabs("new_item_groups");
690
691 $form = new ilPropertyFormGUI();
692
693 $this->lng->loadLanguageModule("meta");
694 $def_lng = $this->lng->getDefaultLanguage();
695
696 $title = new ilTextInputGUI($this->lng->txt("title"), "title_" . $def_lng);
697 $title->setInfo($this->lng->txt("meta_l_" . $def_lng) .
698 " (" . $this->lng->txt("default_language") . ")");
699 $title->setRequired(true);
700 $form->addItem($title);
701
702 foreach ($this->lng->getInstalledLanguages() as $lang_id) {
703 if ($lang_id !== $def_lng) {
704 $title = new ilTextInputGUI($this->lng->txt("translation"), "title_" . $lang_id);
705 $title->setInfo($this->lng->txt("meta_l_" . $lang_id));
706 $form->addItem($title);
707 }
708 }
709
710 if (!$a_grp_id) {
711 $form->setTitle($this->lng->txt("rep_new_item_group_add"));
712 $form->setFormAction($this->ctrl->getFormAction($this, "saveNewItemGroup"));
713
714 $form->addCommandButton("saveNewItemGroup", $this->lng->txt("save"));
715 } else {
716 $form->setTitle($this->lng->txt("rep_new_item_group_edit"));
717 $form->setFormAction($this->ctrl->getFormAction($this, "updateNewItemGroup"));
718
720 $grp = $grp[$a_grp_id];
721
722 foreach ($grp["titles"] as $id => $value) {
723 $field = $form->getItemByPostVar("title_" . $id);
724 if ($field) {
725 $field->setValue($value);
726 }
727 }
728
729 $form->addCommandButton("updateNewItemGroup", $this->lng->txt("save"));
730 }
731 $form->addCommandButton("listNewItemGroups", $this->lng->txt("cancel"));
732
733 return $form;
734 }
This class represents a property form user interface.
This class represents a text property in a property form.

References ilObjectGUI\$id, ILIAS\Repository\ctrl(), ilObjRepositorySettings\getNewItemGroups(), ILIAS\Repository\lng(), and setModuleSubTabs().

Referenced by addNewItemGroup(), editNewItemGroup(), saveNewItemGroup(), and updateNewItemGroup().

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

◆ initSettingsForm()

ilObjRepositorySettingsGUI::initSettingsForm ( )
protected

Definition at line 147 of file class.ilObjRepositorySettingsGUI.php.

147 : StandardForm
148 {
150 $ilAccess = $this->access;
151
152 $read_only = !$ilAccess->checkAccess('write', '', $this->object->getRefId());
153
154 $f = $this->factory->input()->field();
155
156 // repository tree
157 $op1 = $f->group(
158 [],
159 $this->lng->txt("adm_rep_tree_only_cntr")
160 )->withByline($this->lng->txt("adm_rep_tree_only_cntr_info"));
161
162 // limit tree in courses and groups
163 $cb = $f->checkbox(
164 $this->lng->txt("adm_rep_tree_limit_grp_crs"),
165 $this->lng->txt("adm_rep_tree_limit_grp_crs_info")
166 )->withValue((bool) $ilSetting->get("rep_tree_limit_grp_crs"));
167
168 $op2 = $f->group(
169 [
170 'rep_tree_limit_grp_crs' => $cb
171 ],
172 $this->lng->txt("adm_rep_tree_all_types")
173 )->withByline($this->lng->txt("adm_rep_tree_all_types_info"));
174
175 $tree_pres = $f->switchableGroup(
176 [
177 '' => $op1,
178 'all_types' => $op2
179 ],
180 $this->lng->txt("adm_rep_tree_presentation")
181 )->withValue($ilSetting->get("repository_tree_pres") ?? "");
182
183 // limit items in tree (number)
184 $tree_limit_number = $f->numeric(
185 $this->lng->txt("rep_tree_limit_number"),
186 $this->lng->txt("rep_tree_limit_number_info")
187 )->withValue($ilSetting->get("rep_tree_limit_number"))
188 ->withAdditionalTransformation($this->getMaxLengthConstraint(3))
189 ->withAdditionalTransformation($this->getNonNegativeConstraint());
190
191 // limit items in tree
192 $tree_limit = $f->optionalGroup(
193 [
194 'rep_tree_limit_number' => $tree_limit_number
195 ],
196 $this->lng->txt("rep_tree_limit"),
197 $this->lng->txt("rep_tree_limit_info")
198 );
199 if ($ilSetting->get("rep_tree_limit_number") <= 0) {
200 $tree_limit = $tree_limit->withValue(null);
201 }
202
203 // breadcrumbs start with courses
204 $change_mode = $f->radio(
205 $this->lng->txt("rep_breadcr_crs_config")
206 )->withOption(
207 '1',
208 $this->lng->txt("rep_breadcr_crs_overwrite")
209 )->withOption(
210 'rep_breadcr_crs_default',
211 $this->lng->txt("rep_breadcr_crs_overwrite_with_default")
212 )->withOption(
213 '0',
214 $this->lng->txt("rep_breadcr_crs_overwrite_not")
215 )->withValue((string) ((int) $ilSetting->get("rep_breadcr_crs_overwrite")));
216 if ($ilSetting->get("rep_breadcr_crs_default")) {
217 $change_mode = $change_mode->withValue('rep_breadcr_crs_default');
218 }
219
220 $breadcrumbs = $f->optionalGroup(
221 [
222 'rep_breadcr_crs_overwrite' => $change_mode
223 ],
224 $this->lng->txt("rep_breadcr_crs")
225 );
226 if (!$ilSetting->get("rep_breadcr_crs")) {
227 $breadcrumbs = $breadcrumbs->withValue(null);
228 }
229
230 // trash
231 $enable_trash = $f->checkbox(
232 $this->lng->txt("enable_trash"),
233 $this->lng->txt("enable_trash_info")
234 )->withValue((bool) $ilSetting->get("enable_trash"));
235
236 // change event
237 $this->lng->loadLanguageModule("trac");
238 $event = $f->checkbox(
239 $this->lng->txt('trac_show_repository_views'),
240 $this->lng->txt("trac_show_repository_views_info")
241 )->withValue(ilChangeEvent::_isActive());
242
243 // export limitations
244 $exp_disabled = $f->group(
245 [],
246 $this->lng->txt("rep_export_limitation_disabled")
247 );
248
249 // export unlimited
250 $exp_unlimited = $f->group(
251 [],
252 $this->lng->txt("rep_export_limitation_unlimited")
253 );
254
255 // limit export items (number)
256 $exp_limit_num = $f->numeric(
257 $this->lng->txt("rep_export_limit_number")
258 )->withAdditionalTransformation($this->getMaxLengthConstraint(6))
259 ->withAdditionalTransformation($this->getPositiveConstraint())
260 ->withValue($ilSetting->get("rep_export_limit_number"))
261 ->withRequired(true);
262
263 $exp_limited = $f->group(
264 [
265 'rep_export_limit_number' => $exp_limit_num
266 ],
267 $this->lng->txt("rep_export_limitation_limited")
268 );
269
270 $limiter = new ilExportLimitation();
271 $exp_limit = $f->switchableGroup(
272 [
273 (string) ilExportLimitation::SET_EXPORT_DISABLED => $exp_disabled,
274 (string) ilExportLimitation::SET_EXPORT_LIMITED => $exp_limited,
275 'rep_export_unlimited' => $exp_unlimited
276 ],
277 $this->lng->txt("rep_export_limitation"),
278 $this->lng->txt("rep_export_limitation_info")
279 )->withValue((string) $limiter->getLimitationMode());
280
281 if (
282 $limiter->getLimitationMode() === ilExportLimitation::SET_EXPORT_LIMITED &&
283 $ilSetting->get("rep_export_limit_number") === ''
284 ) {
285 $exp_limit = $exp_limit->withValue('rep_export_unlimited');
286 }
287
288 // Show download action for folder
289 $dl_prob = $f->checkbox(
290 $this->lng->txt("enable_download_folder"),
291 $this->lng->txt('enable_download_folder_info')
292 )->withValue(
293 (int) $this->folder_settings->get(
294 "enable_download_folder",
295 '0'
296 ) === 1
297 ); // default value should reflect previous behaviour (-> 0)
298
299 // multi download
300 $dl_prop = $f->checkbox(
301 $this->lng->txt("enable_multi_download"),
302 $this->lng->txt('enable_multi_download_info')
303 )->withValue(
304 (int) $this->folder_settings->get(
305 "enable_multi_download",
306 '1'
307 ) === 1
308 ); // default value should reflect previous behaviour (-> 0)
309
310 // favourites
311 $fav = $f->checkbox(
312 $this->lng->txt("rep_favourites"),
313 $this->lng->txt("rep_favourites_info")
314 )->withValue($ilSetting->get("rep_favourites", "0") === "1");
315
316 //TODO split this up into two sections
317 $settings = $f->section(
318 [
319 'tree_pres' => $tree_pres,
320 'rep_tree_limit' => $tree_limit,
321 'rep_breadcr_crs' => $breadcrumbs,
322 'enable_trash' => $enable_trash,
323 'change_event_tracking' => $event,
324 'rep_export_limitation' => $exp_limit,
325 'enable_download_folder' => $dl_prob,
326 'enable_multi_download' => $dl_prop,
327 'rep_favourites' => $fav
328 ],
329 $this->lng->txt("settings")
330 )->withDisabled($read_only);
331
332 // object lists
333 //shorten description
334 $sdesclen = $f->numeric(
335 $this->lng->txt("adm_rep_shorten_description_length")
336 )->withValue($ilSetting->get("rep_shorten_description_length"))
337 ->withAdditionalTransformation($this->getMaxLengthConstraint(3))
338 ->withAdditionalTransformation($this->getNonNegativeConstraint());
339
340 $sdesc = $f->optionalGroup(
341 [
342 'rep_shorten_description_length' => $sdesclen
343 ],
344 $this->lng->txt("adm_rep_shorten_description"),
345 $this->lng->txt("adm_rep_shorten_description_info")
346 );
347 if (!$ilSetting->get("rep_shorten_description")) {
348 $sdesc = $sdesc->withValue(null);
349 }
350
351 // notes/comments/tagging
352 $pltags = $f->checkbox(
353 $this->lng->txt('adm_show_comments_tagging_in_lists_tags')
354 )->withValue((bool) $ilSetting->get('comments_tagging_in_lists_tags'));
355
356 $pl = $f->optionalGroup(
357 [
358 'comments_tagging_in_lists_tags' => $pltags
359 ],
360 $this->lng->txt('adm_show_comments_tagging_in_lists')
361 );
362 if (!$ilSetting->get('comments_tagging_in_lists')) {
363 $pl = $pl->withValue(null);
364 }
365
366 $obj_lists = $f->section(
367 [
368 'rep_shorten_description' => $sdesc,
369 'comments_tagging_in_lists' => $pl
370 ],
371 $this->lng->txt("rep_object_lists")
372 )->withDisabled($read_only);
373
374 $form = $this->factory->input()->container()->form()->standard(
375 $this->ctrl->getFormAction($this, 'saveSettings'),
376 [
377 'settings' => $settings,
378 'obj_lists' => $obj_lists
379 ]
380 );
381
382 return $form;
383 }
Export limitation checker.
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, Vendor\Package\$f, $ilSetting, ilObjectGUI\$settings, ilChangeEvent\_isActive(), ilRBACAccessHandler\checkAccess(), ILIAS\Repository\ctrl(), factory(), getMaxLengthConstraint(), getNonNegativeConstraint(), getPositiveConstraint(), ILIAS\Repository\lng(), ILIAS\Repository\object(), ilExportLimitation\SET_EXPORT_DISABLED, and ilExportLimitation\SET_EXPORT_LIMITED.

Referenced by saveSettings(), and view().

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

◆ listModules()

ilObjRepositorySettingsGUI::listModules ( )
protected

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

603 : void
604 {
605 $ilAccess = $this->access;
606
607 $this->setModuleSubTabs("list_mods");
608
609 $has_write = $ilAccess->checkAccess('write', '', $this->object->getRefId());
610
611 $comp_table = new ilModulesTableGUI($this, "listModules", $has_write);
612
613 $this->tpl->setContent($comp_table->getHTML());
614 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

References ilObjectGUI\$access, ILIAS\Repository\object(), and setModuleSubTabs().

+ Here is the call graph for this function:

◆ listNewItemGroups()

ilObjRepositorySettingsGUI::listNewItemGroups ( )
protected

Definition at line 666 of file class.ilObjRepositorySettingsGUI.php.

666 : void
667 {
668 $ilToolbar = $this->toolbar;
669 $ilAccess = $this->access;
670
671 $this->setModuleSubTabs("new_item_groups");
672
673 $has_write = $ilAccess->checkAccess('write', '', $this->object->getRefId());
674
675 if ($has_write) {
676 $ilToolbar->addButton(
677 $this->lng->txt("rep_new_item_group_add"),
678 $this->ctrl->getLinkTarget($this, "addNewItemGroup")
679 );
680 }
681
682 $grp_table = new ilNewItemGroupTableGUI($this, "listNewItemGroups", $has_write);
683
684 $this->tpl->setContent($grp_table->getHTML());
685 }
TableGUI class for new item groups.
ilToolbarGUI $toolbar

References ilObjectGUI\$access, ilObjectGUI\$toolbar, ILIAS\Repository\lng(), ILIAS\Repository\object(), and setModuleSubTabs().

Referenced by confirmDeleteNewItemGroup(), and deleteNewItemGroup().

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

◆ saveCustomIcons()

ilObjRepositorySettingsGUI::saveCustomIcons ( )

Definition at line 552 of file class.ilObjRepositorySettingsGUI.php.

552 : void
553 {
555 $ilAccess = $this->access;
556
557 if (!$ilAccess->checkAccess('write', '', $this->object->getRefId())) {
558 $this->tpl->setOnScreenMessage(
559 'failure',
560 $this->lng->txt('permission_denied'),
561 true
562 );
563 $this->ctrl->redirect($this, "customIcons");
564 }
565
566 $form = $this->initCustomIconsForm()
567 ->withRequest($this->http->request());
568 if ($form->getData()) {
569 $ilSetting->set(
570 "custom_icons",
571 (string) ((int) $form->getData()['section']['custom_icons'])
572 );
573 $this->tpl->setOnScreenMessage(
574 'success',
575 $this->lng->txt("msg_obj_modified"),
576 true
577 );
578 $this->ctrl->redirect($this, "customIcons");
579 }
580
581 $this->customIcons($form);
582 }
static http()
Fetches the global http state from ILIAS.

References ilObjectGUI\$access, $ilSetting, ilObjectGUI\$settings, ILIAS\Repository\ctrl(), customIcons(), ILIAS\FileDelivery\http(), initCustomIconsForm(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ saveModules()

ilObjRepositorySettingsGUI::saveModules ( )
protected

Definition at line 616 of file class.ilObjRepositorySettingsGUI.php.

616 : void
617 {
619 $ilCtrl = $this->ctrl;
621 $ilAccess = $this->access;
622
623 $item_groups = $this->admin_gui_request->getNewItemGroups();
624 $item_positions = $this->admin_gui_request->getNewItemPositions();
625
626 if (count($item_groups) === 0 || count($item_positions) === 0 ||
627 !$ilAccess->checkAccess('write', '', $this->object->getRefId())) {
628 $ilCtrl->redirect($this, "listModules");
629 }
630
631 $grp_pos_map = [0 => 9999];
632 foreach (ilObjRepositorySettings::getNewItemGroups() as $item) {
633 $grp_pos_map[$item["id"]] = $item["pos"];
634 }
635
636 $type_pos_map = [];
637 $item_enablings = $this->admin_gui_request->getNewItemEnablings();
638 foreach ($item_positions as $obj_type => $pos) {
639 $grp_id = ($item_groups[$obj_type] ?? 0);
640 $type_pos_map[$grp_id][$obj_type] = $pos;
641
642 // enable creation?
643 $ilSetting->set(
644 "obj_dis_creation_" . $obj_type,
645 (string) ((int) (!($item_enablings[$obj_type] ?? false)))
646 );
647 }
648
649 foreach ($type_pos_map as $grp_id => $obj_types) {
650 $grp_pos = str_pad((string) $grp_pos_map[$grp_id], 4, "0", STR_PAD_LEFT);
651
652 asort($obj_types);
653 $pos = 0;
654 foreach (array_keys($obj_types) as $obj_type) {
655 $pos += 10;
656 $type_pos = $grp_pos . str_pad((string) $pos, 4, "0", STR_PAD_LEFT);
657 $ilSetting->set("obj_add_new_pos_" . $obj_type, (string) $type_pos);
658 $ilSetting->set("obj_add_new_pos_grp_" . $obj_type, (string) $grp_id);
659 }
660 }
661
662 $this->tpl->setOnScreenMessage('success', $lng->txt("msg_obj_modified"), true);
663 $ilCtrl->redirect($this, "listModules");
664 }
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...
ilLanguage $lng

References ilObjectGUI\$access, ilObjectGUI\$ctrl, $ilSetting, ilObjectGUI\$lng, ilObjectGUI\$settings, ilObjRepositorySettings\getNewItemGroups(), ILIAS\Repository\int(), and ilLanguage\txt().

+ Here is the call graph for this function:

◆ saveNewItemGroup()

ilObjRepositorySettingsGUI::saveNewItemGroup ( )
protected

Definition at line 745 of file class.ilObjRepositorySettingsGUI.php.

745 : void
746 {
747 $form = $this->initNewItemGroupForm();
748 if ($form->checkInput()) {
749 $titles = [];
750 foreach ($this->lng->getInstalledLanguages() as $lang_id) {
751 $titles[$lang_id] = $form->getInput("title_" . $lang_id);
752 }
753
755 $this->tpl->setOnScreenMessage('success', $this->lng->txt("settings_saved"), true);
756 $this->ctrl->redirect($this, "listNewItemGroups");
757 }
758 }
759
760 $form->setValuesByPost();
761 $this->addNewItemGroup($form);
762 }
addNewItemGroup(?ilPropertyFormGUI $a_form=null)
static addNewItemGroup(array $a_titles)

References addNewItemGroup(), ilObjRepositorySettings\addNewItemGroup(), ILIAS\Repository\ctrl(), initNewItemGroupForm(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ saveNewItemGroupOrder()

ilObjRepositorySettingsGUI::saveNewItemGroupOrder ( )
protected

Definition at line 805 of file class.ilObjRepositorySettingsGUI.php.

805 : void
806 {
808
809 $group_order = $this->admin_gui_request->getNewItemGroupOrder();
810 if (count($group_order) > 0) {
812
813 $grp_pos_map = [];
814 foreach (ilObjRepositorySettings::getNewItemGroups() as $item) {
815 $grp_pos_map[$item["id"]] = str_pad((string) $item["pos"], 4, "0", STR_PAD_LEFT);
816 }
817
818 // update order of assigned objects
819 foreach (ilObjRepositorySettings::getNewItemGroupSubItems() as $grp_id => $subitems) {
820 // unassigned objects will always be last
821 if ($grp_id) {
822 foreach ($subitems as $obj_type) {
823 $old_pos = $ilSetting->get("obj_add_new_pos_" . $obj_type);
824 if (strlen($old_pos) === 8) {
825 $new_pos = $grp_pos_map[$grp_id] . substr($old_pos, 4);
826 $ilSetting->set("obj_add_new_pos_" . $obj_type, $new_pos);
827 }
828 }
829 }
830 }
831
832 $this->tpl->setOnScreenMessage('success', $this->lng->txt("settings_saved"), true);
833 }
834 $this->ctrl->redirect($this, "listNewItemGroups");
835 }
static updateNewItemGroupOrder(array $a_order)

References $ilSetting, ilObjectGUI\$settings, ILIAS\Repository\ctrl(), ilObjRepositorySettings\getNewItemGroups(), ilObjRepositorySettings\getNewItemGroupSubItems(), ILIAS\Repository\lng(), and ilObjRepositorySettings\updateNewItemGroupOrder().

+ Here is the call graph for this function:

◆ saveSettings()

ilObjRepositorySettingsGUI::saveSettings ( )

Definition at line 385 of file class.ilObjRepositorySettingsGUI.php.

385 : void
386 {
388 $ilAccess = $this->access;
389
390 if (!$ilAccess->checkAccess('write', '', $this->object->getRefId())) {
391 $this->tpl->setOnScreenMessage(
392 'failure',
393 $this->lng->txt('permission_denied'),
394 true
395 );
396 $this->ctrl->redirect($this, "view");
397 }
398
399 $form = $this->initSettingsForm()
400 ->withRequest($this->http->request());
401 if ($form->getData()) {
402 $data = $form->getData()['settings'];
403 $ilSetting->set(
404 "repository_tree_pres",
405 $data["tree_pres"][0]
406 );
407 if ($data['tree_pres'][0] === 'all_types') {
408 $ilSetting->set(
409 "rep_tree_limit_grp_crs",
410 (string) $data['tree_pres'][1]["rep_tree_limit_grp_crs"] ?? ''
411 );
412 }
413
414 $ilSetting->set(
415 "rep_favourites",
416 $data["rep_favourites"] ? "1" : "0"
417 );
418
419 if ($data["rep_export_limitation"][0] === 'rep_export_unlimited') {
420 $ilSetting->set(
421 "rep_export_limitation",
423 );
424 $ilSetting->set(
425 "rep_export_limit_number",
426 ''
427 );
428 } else {
429 $ilSetting->set(
430 "rep_export_limitation",
431 (string) $data["rep_export_limitation"][0]
432 );
433 }
434 if ($data["rep_export_limitation"][0] === (string) ilExportLimitation::SET_EXPORT_LIMITED) {
435 $ilSetting->set(
436 "rep_export_limit_number",
437 (string) ($data["rep_export_limitation"][1]["rep_export_limit_number"] ?? '')
438 );
439 }
440
441 $ilSetting->set(
442 "enable_trash",
443 (string) $data["enable_trash"]
444 );
445
446 $ilSetting->set(
447 "rep_breadcr_crs",
448 (string) ((int) $data["rep_breadcr_crs"])
449 );
450 if (isset($data["rep_breadcr_crs"])) {
451 $overwrite = $data["rep_breadcr_crs"]["rep_breadcr_crs_overwrite"];
452 $ilSetting->set(
453 "rep_breadcr_crs_default",
454 (string) ((int) ($overwrite === 'rep_breadcr_crs_default'))
455 );
456 if ($overwrite === 'rep_breadcr_crs_default') {
457 $overwrite = '1';
458 }
459 $ilSetting->set(
460 "rep_breadcr_crs_overwrite",
461 (string) ((int) $overwrite)
462 );
463 }
464
465 // repository tree limit of children
466 $limit_number = ($data['rep_tree_limit'] &&
467 $data['rep_tree_limit']['rep_tree_limit_number'] > 0)
468 ? (int) $data['rep_tree_limit']['rep_tree_limit_number']
469 : 0;
470 $ilSetting->set('rep_tree_limit_number', (string) $limit_number);
471
472 $this->folder_settings->set(
473 "enable_download_folder",
474 (string) ((int) $data["enable_download_folder"] === 1)
475 );
476 $this->folder_settings->set(
477 "enable_multi_download",
478 (string) ((int) $data["enable_multi_download"] === 1)
479 );
480 if ($data['change_event_tracking']) {
482 } else {
484 }
485
486 //object lists
487 $data = $form->getData()['obj_lists'];
488 $ilSetting->set(
489 "rep_shorten_description",
490 (string) ((int) $data['rep_shorten_description'])
491 );
492 if (isset($data['rep_shorten_description'])) {
493 $ilSetting->set(
494 "rep_shorten_description_length",
495 (string) ((int) $data['rep_shorten_description']['rep_shorten_description_length'])
496 );
497 }
498 $ilSetting->set(
499 'comments_tagging_in_lists',
500 (string) ((int) $data['comments_tagging_in_lists'])
501 );
502 if (isset($data['comments_tagging_in_lists'])) {
503 $ilSetting->set(
504 'comments_tagging_in_lists_tags',
505 (string) $data['comments_tagging_in_lists']['comments_tagging_in_lists_tags']
506 );
507 }
508
509 $this->tpl->setOnScreenMessage('success', $this->lng->txt("msg_obj_modified"), true);
510 $this->ctrl->redirect($this, "view");
511 }
512
513 $this->view($form);
514 }
static _activate()
Activates change event tracking.
static _deactivate()
Deactivates change event tracking.

References ilObjectGUI\$access, ilObjectGUI\$data, $ilSetting, ilObjectGUI\$settings, ilChangeEvent\_activate(), ilChangeEvent\_deactivate(), ILIAS\Repository\ctrl(), ILIAS\FileDelivery\http(), initSettingsForm(), ILIAS\Repository\int(), ILIAS\Repository\lng(), ilExportLimitation\SET_EXPORT_LIMITED, and view().

+ Here is the call graph for this function:

◆ setModuleSubTabs()

ilObjRepositorySettingsGUI::setModuleSubTabs ( string  $a_active)
protected

Definition at line 584 of file class.ilObjRepositorySettingsGUI.php.

584 : void
585 {
586 $this->tabs_gui->activateTab('modules');
587
588 $this->tabs_gui->addSubTab(
589 "list_mods",
590 $this->lng->txt("rep_new_item_menu"),
591 $this->ctrl->getLinkTarget($this, "listModules")
592 );
593
594 $this->tabs_gui->addSubTab(
595 "new_item_groups",
596 $this->lng->txt("rep_new_item_groups"),
597 $this->ctrl->getLinkTarget($this, "listNewItemGroups")
598 );
599
600 $this->tabs_gui->activateSubTab($a_active);
601 }

References ILIAS\Repository\lng().

Referenced by confirmDeleteNewItemGroup(), initNewItemGroupForm(), listModules(), and listNewItemGroups().

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

◆ updateNewItemGroup()

ilObjRepositorySettingsGUI::updateNewItemGroup ( )
protected

Definition at line 779 of file class.ilObjRepositorySettingsGUI.php.

779 : void
780 {
781 $grp_id = $this->admin_gui_request->getNewItemGroupId();
782 if (!$grp_id) {
783 $this->ctrl->redirect($this, "listNewItemGroups");
784 }
785
786 $this->ctrl->setParameter($this, "grp_id", $grp_id);
787
788 $form = $this->initNewItemGroupForm($grp_id);
789 if ($form->checkInput()) {
790 $titles = [];
791 foreach ($this->lng->getInstalledLanguages() as $lang_id) {
792 $titles[$lang_id] = $form->getInput("title_" . $lang_id);
793 }
794
795 if (ilObjRepositorySettings::updateNewItemGroup($grp_id, $titles)) {
796 $this->tpl->setOnScreenMessage('success', $this->lng->txt("settings_saved"), true);
797 $this->ctrl->redirect($this, "listNewItemGroups");
798 }
799 }
800
801 $form->setValuesByPost();
802 $this->addNewItemGroup($form);
803 }
static updateNewItemGroup(int $a_id, array $a_titles)

References addNewItemGroup(), ILIAS\Repository\ctrl(), initNewItemGroupForm(), ILIAS\Repository\lng(), and ilObjRepositorySettings\updateNewItemGroup().

+ Here is the call graph for this function:

◆ view()

ilObjRepositorySettingsGUI::view ( ?StandardForm  $a_form = null)

Definition at line 136 of file class.ilObjRepositorySettingsGUI.php.

136 : void
137 {
138 $this->tabs_gui->activateTab("settings");
139
140 if (!$a_form) {
141 $a_form = $this->initSettingsForm();
142 }
143
144 $this->tpl->setContent($this->renderer->render($a_form));
145 }

References initSettingsForm(), and renderer().

Referenced by saveSettings().

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

Field Documentation

◆ $admin_gui_request

AdministrationGUIRequest ilObjRepositorySettingsGUI::$admin_gui_request
protected

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

◆ $error

ilErrorHandling ilObjRepositorySettingsGUI::$error
protected

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

Referenced by executeCommand().

◆ $factory

UIFactory ilObjRepositorySettingsGUI::$factory
protected

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

◆ $folder_settings

ilSetting ilObjRepositorySettingsGUI::$folder_settings
protected

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

◆ $rbacsystem

ilRbacSystem ilObjRepositorySettingsGUI::$rbacsystem
protected

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

Referenced by getAdminTabs().

◆ $refinery

RefFactory ilObjRepositorySettingsGUI::$refinery
protected

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

◆ $renderer

UIRenderer ilObjRepositorySettingsGUI::$renderer
protected

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


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