ILIAS  trunk Revision v11.0_alpha-1715-g7fc467680fb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
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
 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 ()
 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
 
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
 
Refinery $refinery
 
ilFavouritesManager $favourites
 
ilObjectCustomIconFactory $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

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\GlobalScreen\Provider\__construct(), ILIAS\Repository\access(), ILIAS\Repository\ctrl(), factory(), ILIAS\FileDelivery\http(), ILIAS\Repository\lng(), ILIAS\Repository\refinery(), renderer(), 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  }
factory()
renderer()
static http()
Fetches the global http state from ILIAS.
global $DIC
Definition: shib_login.php:22
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ addNewItemGroup()

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

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

References initNewItemGroupForm().

Referenced by saveNewItemGroup(), and updateNewItemGroup().

738  : void
739  {
740  if (!$a_form) {
741  $a_form = $this->initNewItemGroupForm();
742  }
743 
744  $this->tpl->setContent($a_form->getHTML());
745  }
+ 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 882 of file class.ilObjRepositorySettingsGUI.php.

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

882  : ?array
883  {
885 
886  switch ($a_form_id) {
888 
889  $fields = ['trac_show_repository_views' => [ilChangeEvent::_isActive(), ilAdministrationSettingsFormHandler::VALUE_BOOL]];
890 
891  return [["view", $fields]];
892 
893 
895 
896  $fields = [
897  'adm_show_comments_tagging_in_lists' => [
898  $ilSetting->get('comments_tagging_in_lists'), ilAdministrationSettingsFormHandler::VALUE_BOOL,
899  ['adm_show_comments_tagging_in_lists_tags' => [$ilSetting->get('comments_tagging_in_lists_tags'), ilAdministrationSettingsFormHandler::VALUE_BOOL]]
900  ]
901  ];
902 
903  return [["view", $fields]];
904  }
905  return null;
906  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
global $ilSetting
Definition: privfeed.php:31
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 839 of file class.ilObjRepositorySettingsGUI.php.

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

839  : void
840  {
841  $group_ids = $this->admin_gui_request->getNewItemGroupIds();
842  if (count($group_ids) === 0) {
843  $this->tpl->setOnScreenMessage('failure', $this->lng->txt("select_one"));
844  $this->listNewItemGroups();
845  return;
846  }
847 
848  $this->setModuleSubTabs("new_item_groups");
849 
850  $cgui = new ilConfirmationGUI();
851  $cgui->setHeaderText($this->lng->txt("rep_new_item_group_delete_sure"));
852 
853  $cgui->setFormAction($this->ctrl->getFormAction($this));
854  $cgui->setCancel($this->lng->txt("cancel"), "listNewItemGroups");
855  $cgui->setConfirm($this->lng->txt("confirm"), "deleteNewItemGroup");
856 
858 
859  foreach ($group_ids as $grp_id) {
860  $cgui->addItem("grp_ids[]", (string) $grp_id, $groups[$grp_id]["title"]);
861  }
862 
863  $this->tpl->setContent($cgui->getHTML());
864  }
+ Here is the call graph for this function:

◆ customIcons()

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

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

References initCustomIconsForm(), and renderer().

Referenced by saveCustomIcons().

518  : void
519  {
520  $this->tabs_gui->activateTab("icons");
521 
522  if (!$a_form) {
523  $a_form = $this->initCustomIconsForm();
524  }
525 
526  $this->tpl->setContent($this->renderer->render($a_form));
527  }
renderer()
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ deleteNewItemGroup()

ilObjRepositorySettingsGUI::deleteNewItemGroup ( )
protected

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

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

866  : void
867  {
868  $group_ids = $this->admin_gui_request->getNewItemGroupIds();
869  if (count($group_ids) === 0) {
870  $this->listNewItemGroups();
871  return;
872  }
873 
874  foreach ($group_ids as $grp_id) {
876  }
877 
878  $this->tpl->setOnScreenMessage('success', $this->lng->txt("settings_saved"), true);
879  $this->ctrl->redirect($this, "listNewItemGroups");
880  }
+ Here is the call graph for this function:

◆ editNewItemGroup()

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

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

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

766  : void
767  {
768  $grp_id = $this->admin_gui_request->getNewItemGroupId();
769  if (!$grp_id) {
770  $this->ctrl->redirect($this, "listNewItemGroups");
771  }
772 
773  if (!$a_form) {
774  $this->ctrl->setParameter($this, "grp_id", $grp_id);
775  $a_form = $this->initNewItemGroupForm($grp_id);
776  }
777 
778  $this->tpl->setContent($a_form->getHTML());
779  }
+ 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:33
ilAccessHandler $access
+ 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 908 of file class.ilObjRepositorySettingsGUI.php.

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

Referenced by initSettingsForm().

908  : Constraint
909  {
910  //This gives max_length many 9's in a row (and 0 for non-positive max_length)
911  //The int cast is necessary for negative max_length
912  $bound = (int) (10 ** $max_length - 1);
913 
914  return $this->refinery->int()->isLessThanOrEqual($bound);
915  }
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 922 of file class.ilObjRepositorySettingsGUI.php.

References ILIAS\Repository\refinery().

Referenced by initSettingsForm().

922  : Constraint
923  {
924  return $this->refinery->int()->isGreaterThanOrEqual(0);
925  }
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 917 of file class.ilObjRepositorySettingsGUI.php.

References ILIAS\Repository\refinery().

Referenced by initSettingsForm().

917  : Constraint
918  {
919  return $this->refinery->int()->isGreaterThan(0);
920  }
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 529 of file class.ilObjRepositorySettingsGUI.php.

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

Referenced by customIcons(), and saveCustomIcons().

529  : StandardForm
530  {
532  $ilAccess = $this->access;
533 
534  $cb = $this->factory->input()->field()->checkbox(
535  $this->lng->txt("enable_custom_icons"),
536  $this->lng->txt("enable_custom_icons_info")
537  )->withValue((bool) $ilSetting->get("custom_icons"));
538 
539  $section = $this->factory->input()->field()->section(
540  ['custom_icons' => $cb],
541  $this->lng->txt("rep_custom_icons")
542  )->withDisabled(
543  !$ilAccess->checkAccess('write', '', $this->object->getRefId())
544  );
545 
546  $form = $this->factory->input()->container()->form()->standard(
547  $this->ctrl->getFormAction($this, 'saveCustomIcons'),
548  ['section' => $section]
549  );
550 
551  return $form;
552  }
factory()
withValue($value)
Get an input like this with another value displayed on the client side.
Definition: Group.php:61
global $ilSetting
Definition: privfeed.php:31
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 689 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().

690  {
691  $this->setModuleSubTabs("new_item_groups");
692 
693  $form = new ilPropertyFormGUI();
694 
695  $this->lng->loadLanguageModule("meta");
696  $def_lng = $this->lng->getDefaultLanguage();
697 
698  $title = new ilTextInputGUI($this->lng->txt("title"), "title_" . $def_lng);
699  $title->setInfo($this->lng->txt("meta_l_" . $def_lng) .
700  " (" . $this->lng->txt("default_language") . ")");
701  $title->setRequired(true);
702  $form->addItem($title);
703 
704  foreach ($this->lng->getInstalledLanguages() as $lang_id) {
705  if ($lang_id !== $def_lng) {
706  $title = new ilTextInputGUI($this->lng->txt("translation"), "title_" . $lang_id);
707  $title->setInfo($this->lng->txt("meta_l_" . $lang_id));
708  $form->addItem($title);
709  }
710  }
711 
712  if (!$a_grp_id) {
713  $form->setTitle($this->lng->txt("rep_new_item_group_add"));
714  $form->setFormAction($this->ctrl->getFormAction($this, "saveNewItemGroup"));
715 
716  $form->addCommandButton("saveNewItemGroup", $this->lng->txt("save"));
717  } else {
718  $form->setTitle($this->lng->txt("rep_new_item_group_edit"));
719  $form->setFormAction($this->ctrl->getFormAction($this, "updateNewItemGroup"));
720 
722  $grp = $grp[$a_grp_id];
723 
724  foreach ($grp["titles"] as $id => $value) {
725  $field = $form->getItemByPostVar("title_" . $id);
726  if ($field) {
727  $field->setValue($value);
728  }
729  }
730 
731  $form->addCommandButton("updateNewItemGroup", $this->lng->txt("save"));
732  }
733  $form->addCommandButton("listNewItemGroups", $this->lng->txt("cancel"));
734 
735  return $form;
736  }
+ 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(), factory(), getMaxLengthConstraint(), getNonNegativeConstraint(), getPositiveConstraint(), ILIAS\Repository\int(), ILIAS\Repository\lng(), null, 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  // notes/comments/tagging
354  $pltags = $f->checkbox(
355  $this->lng->txt('adm_show_comments_tagging_in_lists_tags')
356  )->withValue((bool) $ilSetting->get('comments_tagging_in_lists_tags'));
357 
358  $pl = $f->optionalGroup(
359  [
360  'comments_tagging_in_lists_tags' => $pltags
361  ],
362  $this->lng->txt('adm_show_comments_tagging_in_lists')
363  );
364  if (!$ilSetting->get('comments_tagging_in_lists')) {
365  $pl = $pl->withValue(null);
366  }
367 
368  $obj_lists = $f->section(
369  [
370  'rep_shorten_description' => $sdesc,
371  'comments_tagging_in_lists' => $pl
372  ],
373  $this->lng->txt("rep_object_lists")
374  )->withDisabled($read_only);
375 
376  $form = $this->factory->input()->container()->form()->standard(
377  $this->ctrl->getFormAction($this, 'saveSettings'),
378  [
379  'settings' => $settings,
380  'obj_lists' => $obj_lists
381  ]
382  );
383 
384  return $form;
385  }
factory()
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) ...
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
withValue($value)
Get an input like this with another value displayed on the client side.
Definition: Group.php:61
global $ilSetting
Definition: privfeed.php:31
static _isActive()
Returns true, if change event tracking is active.
Export limitation checker.
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 605 of file class.ilObjRepositorySettingsGUI.php.

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

605  : void
606  {
607  $ilAccess = $this->access;
608 
609  $this->setModuleSubTabs("list_mods");
610 
611  $has_write = $ilAccess->checkAccess('write', '', $this->object->getRefId());
612 
613  $comp_table = new ilModulesTableGUI($this, "listModules", $has_write);
614 
615  $this->tpl->setContent($comp_table->getHTML());
616  }
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 668 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().

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

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

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

◆ saveModules()

ilObjRepositorySettingsGUI::saveModules ( )
protected

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

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

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

◆ saveNewItemGroup()

ilObjRepositorySettingsGUI::saveNewItemGroup ( )
protected

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

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

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

◆ saveNewItemGroupOrder()

ilObjRepositorySettingsGUI::saveNewItemGroupOrder ( )
protected

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

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

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

◆ saveSettings()

ilObjRepositorySettingsGUI::saveSettings ( )

Definition at line 387 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().

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

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

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

586  : void
587  {
588  $this->tabs_gui->activateTab('modules');
589 
590  $this->tabs_gui->addSubTab(
591  "list_mods",
592  $this->lng->txt("rep_new_item_menu"),
593  $this->ctrl->getLinkTarget($this, "listModules")
594  );
595 
596  $this->tabs_gui->addSubTab(
597  "new_item_groups",
598  $this->lng->txt("rep_new_item_groups"),
599  $this->ctrl->getLinkTarget($this, "listNewItemGroups")
600  );
601 
602  $this->tabs_gui->activateSubTab($a_active);
603  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateNewItemGroup()

ilObjRepositorySettingsGUI::updateNewItemGroup ( )
protected

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

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

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

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  }
renderer()
+ 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: