ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
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 ()
 
 view (StandardForm $a_form=null)
 
 saveSettings ()
 
 customIcons (StandardForm $a_form=null)
 
 saveCustomIcons ()
 
 addToExternalSettingsForm (int $a_form_id)
 
- 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)
 

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 ()
 
 addNewItemGroupSeparator ()
 
 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...
 
 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

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

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

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 46 of file class.ilObjRepositorySettingsGUI.php.

References $DIC, ILIAS\MetaData\Repository\Validation\Data\__construct(), ILIAS\Repository\access(), ILIAS\Repository\ctrl(), ILIAS\FileDelivery\http(), ILIAS\Repository\lng(), ILIAS\Repository\refinery(), ILIAS\Repository\settings(), and ILIAS\Repository\toolbar().

51  {
52  global $DIC;
53 
54  $this->error = $DIC["ilErr"];
55  $this->access = $DIC->access();
56  $this->rbacsystem = $DIC->rbac()->system();
57  $this->settings = $DIC->settings();
58  $this->folder_settings = new ilSetting('fold');
59  $this->http = $DIC->http();
60  $this->ctrl = $DIC->ctrl();
61  $this->lng = $DIC->language();
62  $this->toolbar = $DIC->toolbar();
63  $this->factory = $DIC->ui()->factory();
64  $this->renderer = $DIC->ui()->renderer();
65  $this->refinery = $DIC->refinery();
66  parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
67 
68  $this->type = 'reps';
69  $this->lng->loadLanguageModule('rep');
70  $this->lng->loadLanguageModule('cmps');
71 
72  $this->admin_gui_request = $DIC
73  ->repository()
74  ->internal()
75  ->gui()
76  ->administration()
77  ->request();
78  }
global $DIC
Definition: feed.php:28
static http()
Fetches the global http state from ILIAS.
__construct(VocabulariesInterface $vocabularies)
+ Here is the call graph for this function:

Member Function Documentation

◆ addNewItemGroup()

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

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

References initNewItemGroupForm().

Referenced by saveNewItemGroup(), and updateNewItemGroup().

754  : void
755  {
756  if (!$a_form) {
757  $a_form = $this->initNewItemGroupForm();
758  }
759 
760  $this->tpl->setContent($a_form->getHTML());
761  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addNewItemGroupSeparator()

ilObjRepositorySettingsGUI::addNewItemGroupSeparator ( )
protected

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

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

823  : void
824  {
826  $this->tpl->setOnScreenMessage('success', $this->lng->txt("settings_saved"), true);
827  }
828  $this->ctrl->redirect($this, "listNewItemGroups");
829  }
+ Here is the call graph for this function:

◆ addToExternalSettingsForm()

ilObjRepositorySettingsGUI::addToExternalSettingsForm ( int  $a_form_id)

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

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

906  : ?array
907  {
909 
910  switch ($a_form_id) {
912 
913  $fields = ['trac_show_repository_views' => [ilChangeEvent::_isActive(), ilAdministrationSettingsFormHandler::VALUE_BOOL]];
914 
915  return [["view", $fields]];
916 
917 
919 
920  $fields = [
921  'adm_show_comments_tagging_in_lists' => [
922  $ilSetting->get('comments_tagging_in_lists'), ilAdministrationSettingsFormHandler::VALUE_BOOL,
923  ['adm_show_comments_tagging_in_lists_tags' => [$ilSetting->get('comments_tagging_in_lists_tags'), ilAdministrationSettingsFormHandler::VALUE_BOOL]]
924  ]
925  ];
926 
927  return [["view", $fields]];
928  }
929  return null;
930  }
global $ilSetting
Definition: privfeed.php:18
static _isActive()
Returns true, if change event tracking is active.
ilSetting $settings
+ Here is the call graph for this function:

◆ confirmDeleteNewItemGroup()

ilObjRepositorySettingsGUI::confirmDeleteNewItemGroup ( )
protected

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

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

863  : void
864  {
865  $group_ids = $this->admin_gui_request->getNewItemGroupIds();
866  if (count($group_ids) === 0) {
867  $this->tpl->setOnScreenMessage('failure', $this->lng->txt("select_one"));
868  $this->listNewItemGroups();
869  return;
870  }
871 
872  $this->setModuleSubTabs("new_item_groups");
873 
874  $cgui = new ilConfirmationGUI();
875  $cgui->setHeaderText($this->lng->txt("rep_new_item_group_delete_sure"));
876 
877  $cgui->setFormAction($this->ctrl->getFormAction($this));
878  $cgui->setCancel($this->lng->txt("cancel"), "listNewItemGroups");
879  $cgui->setConfirm($this->lng->txt("confirm"), "deleteNewItemGroup");
880 
882 
883  foreach ($group_ids as $grp_id) {
884  $cgui->addItem("grp_ids[]", (string) $grp_id, $groups[$grp_id]["title"]);
885  }
886 
887  $this->tpl->setContent($cgui->getHTML());
888  }
+ Here is the call graph for this function:

◆ customIcons()

ilObjRepositorySettingsGUI::customIcons ( StandardForm  $a_form = null)

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

References initCustomIconsForm().

Referenced by saveCustomIcons().

529  : void
530  {
531  $this->tabs_gui->activateTab("icons");
532 
533  if (!$a_form) {
534  $a_form = $this->initCustomIconsForm();
535  }
536 
537  $this->tpl->setContent($this->renderer->render($a_form));
538  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ deleteNewItemGroup()

ilObjRepositorySettingsGUI::deleteNewItemGroup ( )
protected

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

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

890  : void
891  {
892  $group_ids = $this->admin_gui_request->getNewItemGroupIds();
893  if (count($group_ids) === 0) {
894  $this->listNewItemGroups();
895  return;
896  }
897 
898  foreach ($group_ids as $grp_id) {
900  }
901 
902  $this->tpl->setOnScreenMessage('success', $this->lng->txt("settings_saved"), true);
903  $this->ctrl->redirect($this, "listNewItemGroups");
904  }
+ Here is the call graph for this function:

◆ editNewItemGroup()

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

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

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

782  : void
783  {
784  $grp_id = $this->admin_gui_request->getNewItemGroupId();
785  if (!$grp_id) {
786  $this->ctrl->redirect($this, "listNewItemGroups");
787  }
788 
789  if (!$a_form) {
790  $this->ctrl->setParameter($this, "grp_id", $grp_id);
791  $a_form = $this->initNewItemGroupForm($grp_id);
792  }
793 
794  $this->tpl->setContent($a_form->getHTML());
795  }
+ Here is the call graph for this function:

◆ executeCommand()

ilObjRepositorySettingsGUI::executeCommand ( )

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

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

80  : void
81  {
83  $ilAccess = $this->access;
84 
85  $next_class = $this->ctrl->getNextClass($this);
86  $cmd = $this->ctrl->getCmd();
87 
88  $this->prepareOutput();
89 
90  if (!$ilAccess->checkAccess('read', '', $this->object->getRefId())) {
91  $ilErr->raiseError($this->lng->txt('no_permission'), $ilErr->WARNING);
92  }
93 
94  switch ($next_class) {
95  case 'ilpermissiongui':
96  $this->tabs_gui->setTabActive('perm_settings');
97  $perm_gui = new ilPermissionGUI($this);
98  $this->ctrl->forwardCommand($perm_gui);
99  break;
100 
101  default:
102  $this->$cmd();
103  break;
104  }
105  }
prepareOutput(bool $show_sub_objects=true)
$ilErr
Definition: raiseError.php:17
ilAccessHandler $access
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
+ Here is the call graph for this function:

◆ getAdminTabs()

ilObjRepositorySettingsGUI::getAdminTabs ( )

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

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

107  : void
108  {
110 
111  $this->tabs_gui->addTab(
112  "settings",
113  $this->lng->txt("settings"),
114  $this->ctrl->getLinkTarget($this, "view")
115  );
116 
117  $this->tabs_gui->addTab(
118  "icons",
119  $this->lng->txt("rep_custom_icons"),
120  $this->ctrl->getLinkTarget($this, "customIcons")
121  );
122 
123  $this->tabs_gui->addTab(
124  "modules",
125  $this->lng->txt("cmps_repository_object_types"),
126  $this->ctrl->getLinkTarget($this, "listModules")
127  );
128 
129  if ($rbacsystem->checkAccess('edit_permission', $this->object->getRefId())) {
130  $this->tabs_gui->addTab(
131  "perm_settings",
132  $this->lng->txt("perm_settings"),
133  $this->ctrl->getLinkTargetByClass('ilpermissiongui', "perm")
134  );
135  }
136  }
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 ...
+ Here is the call graph for this function:

◆ getMaxLengthConstraint()

ilObjRepositorySettingsGUI::getMaxLengthConstraint ( int  $max_length)
protected

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

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

Referenced by initSettingsForm().

932  : Constraint
933  {
934  //This gives max_length many 9's in a row (and 0 for non-positive max_length)
935  //The int cast is necessary for negative max_length
936  $bound = (int) (10 ** $max_length - 1);
937 
938  return $this->refinery->int()->isLessThanOrEqual($bound);
939  }
A constraint encodes some resrtictions on values.
Definition: Constraint.php:31
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getNonNegativeConstraint()

ilObjRepositorySettingsGUI::getNonNegativeConstraint ( )
protected

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

References ILIAS\Repository\refinery().

Referenced by initSettingsForm().

946  : Constraint
947  {
948  return $this->refinery->int()->isGreaterThanOrEqual(0);
949  }
A constraint encodes some resrtictions on values.
Definition: Constraint.php:31
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getPositiveConstraint()

ilObjRepositorySettingsGUI::getPositiveConstraint ( )
protected

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

References ILIAS\Repository\refinery().

Referenced by initSettingsForm().

941  : Constraint
942  {
943  return $this->refinery->int()->isGreaterThan(0);
944  }
A constraint encodes some resrtictions on values.
Definition: Constraint.php:31
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initCustomIconsForm()

ilObjRepositorySettingsGUI::initCustomIconsForm ( )
protected

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

References ilObjectGUI\$access, $ilSetting, ilObjectGUI\$settings, ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), and ILIAS\UI\Implementation\Component\Input\withValue().

Referenced by customIcons(), and saveCustomIcons().

540  : StandardForm
541  {
543  $ilAccess = $this->access;
544 
545  $cb = $this->factory->input()->field()->checkbox(
546  $this->lng->txt("enable_custom_icons"),
547  $this->lng->txt("enable_custom_icons_info")
548  )->withValue((bool) $ilSetting->get("custom_icons"));
549 
550  $section = $this->factory->input()->field()->section(
551  ['custom_icons' => $cb],
552  $this->lng->txt("rep_custom_icons")
553  )->withDisabled(
554  !$ilAccess->checkAccess('write', '', $this->object->getRefId())
555  );
556 
557  $form = $this->factory->input()->container()->form()->standard(
558  $this->ctrl->getFormAction($this, 'saveCustomIcons'),
559  ['section' => $section]
560  );
561 
562  return $form;
563  }
withValue($value)
Get an input like this with another value displayed on the client side.
Definition: Group.php:58
global $ilSetting
Definition: privfeed.php:18
ilAccessHandler $access
ilSetting $settings
+ 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 705 of file class.ilObjRepositorySettingsGUI.php.

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

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

706  {
707  $this->setModuleSubTabs("new_item_groups");
708 
709  $form = new ilPropertyFormGUI();
710 
711  $this->lng->loadLanguageModule("meta");
712  $def_lng = $this->lng->getDefaultLanguage();
713 
714  $title = new ilTextInputGUI($this->lng->txt("title"), "title_" . $def_lng);
715  $title->setInfo($this->lng->txt("meta_l_" . $def_lng) .
716  " (" . $this->lng->txt("default_language") . ")");
717  $title->setRequired(true);
718  $form->addItem($title);
719 
720  foreach ($this->lng->getInstalledLanguages() as $lang_id) {
721  if ($lang_id !== $def_lng) {
722  $title = new ilTextInputGUI($this->lng->txt("translation"), "title_" . $lang_id);
723  $title->setInfo($this->lng->txt("meta_l_" . $lang_id));
724  $form->addItem($title);
725  }
726  }
727 
728  if (!$a_grp_id) {
729  $form->setTitle($this->lng->txt("rep_new_item_group_add"));
730  $form->setFormAction($this->ctrl->getFormAction($this, "saveNewItemGroup"));
731 
732  $form->addCommandButton("saveNewItemGroup", $this->lng->txt("save"));
733  } else {
734  $form->setTitle($this->lng->txt("rep_new_item_group_edit"));
735  $form->setFormAction($this->ctrl->getFormAction($this, "updateNewItemGroup"));
736 
738  $grp = $grp[$a_grp_id];
739 
740  foreach ($grp["titles"] as $id => $value) {
741  $field = $form->getItemByPostVar("title_" . $id);
742  if ($field) {
743  $field->setValue($value);
744  }
745  }
746 
747  $form->addCommandButton("updateNewItemGroup", $this->lng->txt("save"));
748  }
749  $form->addCommandButton("listNewItemGroups", $this->lng->txt("cancel"));
750 
751  return $form;
752  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initSettingsForm()

ilObjRepositorySettingsGUI::initSettingsForm ( )
protected

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

References ilObjectGUI\$access, Vendor\Package\$f, $ilSetting, ilObjectGUI\$settings, ilChangeEvent\_isActive(), ilRBACAccessHandler\checkAccess(), ILIAS\Repository\ctrl(), getMaxLengthConstraint(), getNonNegativeConstraint(), getPositiveConstraint(), ILIAS\Repository\int(), ILIAS\Repository\lng(), ILIAS\Repository\object(), ilExportLimitation\SET_EXPORT_DISABLED, ilExportLimitation\SET_EXPORT_LIMITED, ILIAS\UI\Implementation\Component\Input\ViewControl\withAdditionalTransformation(), and ILIAS\UI\Implementation\Component\Input\withValue().

Referenced by saveSettings(), and view().

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

◆ listModules()

ilObjRepositorySettingsGUI::listModules ( )
protected

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

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

616  : void
617  {
618  $ilAccess = $this->access;
619 
620  $this->setModuleSubTabs("list_mods");
621 
622  $has_write = $ilAccess->checkAccess('write', '', $this->object->getRefId());
623 
624  $comp_table = new ilModulesTableGUI($this, "listModules", $has_write);
625 
626  $this->tpl->setContent($comp_table->getHTML());
627  }
ilAccessHandler $access
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:

◆ listNewItemGroups()

ilObjRepositorySettingsGUI::listNewItemGroups ( )
protected

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

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

Referenced by confirmDeleteNewItemGroup(), and deleteNewItemGroup().

679  : void
680  {
681  $ilToolbar = $this->toolbar;
682  $ilAccess = $this->access;
683 
684  $this->setModuleSubTabs("new_item_groups");
685 
686  $has_write = $ilAccess->checkAccess('write', '', $this->object->getRefId());
687 
688  if ($has_write) {
689  $ilToolbar->addButton(
690  $this->lng->txt("rep_new_item_group_add"),
691  $this->ctrl->getLinkTarget($this, "addNewItemGroup")
692  );
693 
694  $ilToolbar->addButton(
695  $this->lng->txt("rep_new_item_group_add_separator"),
696  $this->ctrl->getLinkTarget($this, "addNewItemGroupSeparator")
697  );
698  }
699 
700  $grp_table = new ilNewItemGroupTableGUI($this, "listNewItemGroups", $has_write);
701 
702  $this->tpl->setContent($grp_table->getHTML());
703  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilToolbarGUI $toolbar
ilAccessHandler $access
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveCustomIcons()

ilObjRepositorySettingsGUI::saveCustomIcons ( )

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

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

565  : void
566  {
568  $ilAccess = $this->access;
569 
570  if (!$ilAccess->checkAccess('write', '', $this->object->getRefId())) {
571  $this->tpl->setOnScreenMessage(
572  'failure',
573  $this->lng->txt('permission_denied'),
574  true
575  );
576  $this->ctrl->redirect($this, "customIcons");
577  }
578 
579  $form = $this->initCustomIconsForm()
580  ->withRequest($this->http->request());
581  if ($form->getData()) {
582  $ilSetting->set(
583  "custom_icons",
584  (string) ((int) $form->getData()['section']['custom_icons'])
585  );
586  $this->tpl->setOnScreenMessage(
587  'success',
588  $this->lng->txt("msg_obj_modified"),
589  true
590  );
591  $this->ctrl->redirect($this, "customIcons");
592  }
593 
594  $this->customIcons($form);
595  }
static http()
Fetches the global http state from ILIAS.
global $ilSetting
Definition: privfeed.php:18
ilAccessHandler $access
ilSetting $settings
+ Here is the call graph for this function:

◆ saveModules()

ilObjRepositorySettingsGUI::saveModules ( )
protected

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

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

629  : void
630  {
632  $ilCtrl = $this->ctrl;
633  $lng = $this->lng;
634  $ilAccess = $this->access;
635 
636  $item_groups = $this->admin_gui_request->getNewItemGroups();
637  $item_positions = $this->admin_gui_request->getNewItemPositions();
638 
639  if (count($item_groups) === 0 || count($item_positions) === 0 ||
640  !$ilAccess->checkAccess('write', '', $this->object->getRefId())) {
641  $ilCtrl->redirect($this, "listModules");
642  }
643 
644  $grp_pos_map = [0 => 9999];
645  foreach (ilObjRepositorySettings::getNewItemGroups() as $item) {
646  $grp_pos_map[$item["id"]] = $item["pos"];
647  }
648 
649  $type_pos_map = [];
650  $item_enablings = $this->admin_gui_request->getNewItemEnablings();
651  foreach ($item_positions as $obj_type => $pos) {
652  $grp_id = ($item_groups[$obj_type] ?? 0);
653  $type_pos_map[$grp_id][$obj_type] = $pos;
654 
655  // enable creation?
656  $ilSetting->set(
657  "obj_dis_creation_" . $obj_type,
658  (string) ((int) (!($item_enablings[$obj_type] ?? false)))
659  );
660  }
661 
662  foreach ($type_pos_map as $grp_id => $obj_types) {
663  $grp_pos = str_pad((string) $grp_pos_map[$grp_id], 4, "0", STR_PAD_LEFT);
664 
665  asort($obj_types);
666  $pos = 0;
667  foreach (array_keys($obj_types) as $obj_type) {
668  $pos += 10;
669  $type_pos = $grp_pos . str_pad((string) $pos, 4, "0", STR_PAD_LEFT);
670  $ilSetting->set("obj_add_new_pos_" . $obj_type, (string) $type_pos);
671  $ilSetting->set("obj_add_new_pos_grp_" . $obj_type, (string) $grp_id);
672  }
673  }
674 
675  $this->tpl->setOnScreenMessage('success', $lng->txt("msg_obj_modified"), true);
676  $ilCtrl->redirect($this, "listModules");
677  }
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
global $ilSetting
Definition: privfeed.php:18
ilAccessHandler $access
ilSetting $settings
+ Here is the call graph for this function:

◆ saveNewItemGroup()

ilObjRepositorySettingsGUI::saveNewItemGroup ( )
protected

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

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

763  : void
764  {
765  $form = $this->initNewItemGroupForm();
766  if ($form->checkInput()) {
767  $titles = [];
768  foreach ($this->lng->getInstalledLanguages() as $lang_id) {
769  $titles[$lang_id] = $form->getInput("title_" . $lang_id);
770  }
771 
773  $this->tpl->setOnScreenMessage('success', $this->lng->txt("settings_saved"), true);
774  $this->ctrl->redirect($this, "listNewItemGroups");
775  }
776  }
777 
778  $form->setValuesByPost();
779  $this->addNewItemGroup($form);
780  }
static addNewItemGroup(array $a_titles)
addNewItemGroup(ilPropertyFormGUI $a_form=null)
+ Here is the call graph for this function:

◆ saveNewItemGroupOrder()

ilObjRepositorySettingsGUI::saveNewItemGroupOrder ( )
protected

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

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

831  : void
832  {
834 
835  $group_order = $this->admin_gui_request->getNewItemGroupOrder();
836  if (count($group_order) > 0) {
838 
839  $grp_pos_map = [];
840  foreach (ilObjRepositorySettings::getNewItemGroups() as $item) {
841  $grp_pos_map[$item["id"]] = str_pad((string) $item["pos"], 4, "0", STR_PAD_LEFT);
842  }
843 
844  // update order of assigned objects
845  foreach (ilObjRepositorySettings::getNewItemGroupSubItems() as $grp_id => $subitems) {
846  // unassigned objects will always be last
847  if ($grp_id) {
848  foreach ($subitems as $obj_type) {
849  $old_pos = $ilSetting->get("obj_add_new_pos_" . $obj_type);
850  if (strlen($old_pos) === 8) {
851  $new_pos = $grp_pos_map[$grp_id] . substr($old_pos, 4);
852  $ilSetting->set("obj_add_new_pos_" . $obj_type, $new_pos);
853  }
854  }
855  }
856  }
857 
858  $this->tpl->setOnScreenMessage('success', $this->lng->txt("settings_saved"), true);
859  }
860  $this->ctrl->redirect($this, "listNewItemGroups");
861  }
static updateNewItemGroupOrder(array $a_order)
global $ilSetting
Definition: privfeed.php:18
ilSetting $settings
+ Here is the call graph for this function:

◆ saveSettings()

ilObjRepositorySettingsGUI::saveSettings ( )

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

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

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

◆ setModuleSubTabs()

ilObjRepositorySettingsGUI::setModuleSubTabs ( string  $a_active)
protected

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

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

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

597  : void
598  {
599  $this->tabs_gui->activateTab('modules');
600 
601  $this->tabs_gui->addSubTab(
602  "list_mods",
603  $this->lng->txt("rep_new_item_menu"),
604  $this->ctrl->getLinkTarget($this, "listModules")
605  );
606 
607  $this->tabs_gui->addSubTab(
608  "new_item_groups",
609  $this->lng->txt("rep_new_item_groups"),
610  $this->ctrl->getLinkTarget($this, "listNewItemGroups")
611  );
612 
613  $this->tabs_gui->activateSubTab($a_active);
614  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateNewItemGroup()

ilObjRepositorySettingsGUI::updateNewItemGroup ( )
protected

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

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

797  : void
798  {
799  $grp_id = $this->admin_gui_request->getNewItemGroupId();
800  if (!$grp_id) {
801  $this->ctrl->redirect($this, "listNewItemGroups");
802  }
803 
804  $this->ctrl->setParameter($this, "grp_id", $grp_id);
805 
806  $form = $this->initNewItemGroupForm($grp_id);
807  if ($form->checkInput()) {
808  $titles = [];
809  foreach ($this->lng->getInstalledLanguages() as $lang_id) {
810  $titles[$lang_id] = $form->getInput("title_" . $lang_id);
811  }
812 
813  if (ilObjRepositorySettings::updateNewItemGroup($grp_id, $titles)) {
814  $this->tpl->setOnScreenMessage('success', $this->lng->txt("settings_saved"), true);
815  $this->ctrl->redirect($this, "listNewItemGroups");
816  }
817  }
818 
819  $form->setValuesByPost();
820  $this->addNewItemGroup($form);
821  }
static updateNewItemGroup(int $a_id, array $a_titles)
addNewItemGroup(ilPropertyFormGUI $a_form=null)
+ Here is the call graph for this function:

◆ view()

ilObjRepositorySettingsGUI::view ( StandardForm  $a_form = null)

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

References initSettingsForm().

Referenced by saveSettings().

138  : void
139  {
140  $this->tabs_gui->activateTab("settings");
141 
142  if (!$a_form) {
143  $a_form = $this->initSettingsForm();
144  }
145 
146  $this->tpl->setContent($this->renderer->render($a_form));
147  }
+ 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 42 of file class.ilObjRepositorySettingsGUI.php.

◆ $folder_settings

ilSetting ilObjRepositorySettingsGUI::$folder_settings
protected

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

◆ $http

GlobalHttpState ilObjRepositorySettingsGUI::$http
protected

Definition at line 41 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 44 of file class.ilObjRepositorySettingsGUI.php.

◆ $renderer

UIRenderer ilObjRepositorySettingsGUI::$renderer
protected

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


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