ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilObjRepositorySettingsGUI Class Reference

Repository settings. More...

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

Public Member Functions

 __construct ($a_data, $a_id, $a_call_by_reference=true, $a_prepare_output=true)
 
 executeCommand ()
 
 getAdminTabs ()
 
 view (ilPropertyFormGUI $a_form=null)
 
 saveSettings ()
 
 customIcons (ilPropertyFormGUI $a_form=null)
 
 saveCustomIcons ()
 
 addToExternalSettingsForm ($a_form_id)
 
- Public Member Functions inherited from ilObjectGUI
 executeCommand ()
 execute command More...
 
 withReferences ()
 determines wether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode ($a_mode=true)
 if true, a creation screen is displayed the current $_GET[ref_id] don't belong to the current class! the mode is determined in ilrepositorygui More...
 
 getCreationMode ()
 get creation mode More...
 
 prepareOutput ($a_show_subobjects=true)
 prepare output More...
 
 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...
 
 cancelDeleteObject ()
 cancel deletion of object More...
 
 cancelObject ()
 cancel action and go back to previous page public More...
 
 createObject ()
 create new object form More...
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 save object More...
 
 getDidacticTemplateVar ($a_type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position. More...
 
 editObject ()
 edit object More...
 
 addExternalEditFormCustom (ilPropertyFormGUI $a_form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction ($a_cmd, $a_formaction="")
 get form action for command (command is method name without "Object", e.g. More...
 
 isVisible ($a_ref_id, $a_type)
 
 viewObject ()
 list childs of current object More...
 
 deleteObject ($a_error=false)
 Display deletion confirmation screen. More...
 
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI. More...
 
 redirectAfterCreation ()
 Redirect after creation, see https://docu.ilias.de/goto_docu_wiki_wpage_5035_1357.html. More...
 

Protected Member Functions

 initSettingsForm ()
 
 initCustomIconsForm ()
 
 setModuleSubTabs ($a_active)
 
 listModules ()
 
 saveModules ()
 
 listNewItemGroups ()
 
 initNewItemGroupForm ($a_grp_id=false)
 
 addNewItemGroup (ilPropertyFormGUI $a_form=null)
 
 saveNewItemGroup ()
 
 editNewItemGroup (ilPropertyFormGUI $a_form=null)
 
 updateNewItemGroup ()
 
 addNewItemGroupSeparator ()
 
 saveNewItemGroupOrder ()
 
 confirmDeleteNewItemGroup ()
 
 deleteNewItemGroup ()
 
- Protected Member Functions inherited from ilObjectGUI
 getObjectService ()
 Get object service. More...
 
 assignObject ()
 
 setTitleAndDescription ()
 called by prepare output More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction ($a_list_gui)
 Insert header action into main template. More...
 
 addHeaderAction ()
 Add header action menu. More...
 
 redrawHeaderActionObject ()
 Ajax call: redraw action header only. More...
 
 showMountWebfolderIcon ()
 
 setTabs ()
 set admin tabs public More...
 
 setAdminTabs ()
 set admin tabs public More...
 
 setLocator ()
 set Locator More...
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator ($a_omit=true)
 
 addAdminLocatorItems ($a_do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 initCreationForms ($a_new_type)
 Init creation froms. More...
 
 getCreationFormsHTML (array $a_forms)
 Get HTML for creation forms (accordion) More...
 
 initCreateForm ($a_new_type)
 Init object creation form. More...
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 Show didactic template types. More...
 
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates. More...
 
 afterSave (ilObject $a_new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 Init object edit form. More...
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 Get values for edit form. More...
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 validateCustom (ilPropertyFormGUI $a_form)
 Validate custom values (if not possible with checkInput()) More...
 
 updateCustom (ilPropertyFormGUI $a_form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 initImportForm ($a_new_type)
 Init object import form. More...
 
 importFileObject ($parent_id=null, $a_catch_errors=true)
 Import. More...
 
 afterImport (ilObject $a_new_object)
 Post (successful) object import hook. More...
 
 setFormAction ($a_cmd, $a_formaction)
 set specific form action for command More...
 
 getReturnLocation ($a_cmd, $a_location="")
 get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation ($a_cmd, $a_location)
 set specific return location for command More...
 
 getTargetFrame ($a_cmd, $a_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame ($a_cmd, $a_target_frame)
 set specific target frame for command More...
 
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu) More...
 
 getTemplateFile ($a_cmd, $a_type="")
 get a template blockfile format: tpl. More...
 
 getTabs ()
 get tabs abstract method. More...
 
 __showButton ($a_cmd, $a_text, $a_target='')
 
 hitsperpageObject ()
 
__initTableGUI ()
 
 __setTableGUIBasicData (&$tbl, &$result_set, $a_from="")
 standard implementation for tables use 'from' variable use different initial setting of table More...
 
 redirectToRefId ($a_ref_id, $a_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 $_GET["ref_id"] value More...
 
 fillCloneTemplate ($a_tpl_varname, $a_type)
 Fill object clone template This method can be called from any object GUI class that wants to offer object cloning. More...
 
 getCenterColumnHTML ()
 Get center column. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 setColumnSettings (ilColumnGUI $column_gui)
 May be overwritten in subclasses. More...
 
 checkPermission ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission and redirect on error. More...
 
 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission. More...
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 handleAutoRating (ilObject $a_new_obj)
 Activate rating automatically if parent container setting. More...
 

Protected Attributes

 $error
 
 $rbacsystem
 
- Protected Attributes inherited from ilObjectGUI
 $ilErr
 
 $locator
 
 $user
 
 $access
 
 $settings
 
 $rbacreview
 
 $toolbar
 
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 
 $object_service
 

Additional Inherited Members

- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot ($a_raise_error=false)
 Goto repository root. More...
 
static _gotoRepositoryNode ($a_ref_id, $a_cmd="frameset")
 Goto repository root. More...
 
- Data Fields inherited from ilObjectGUI
const COPY_WIZARD_NEEDS_PAGE = 1
 
 $objDefinition
 
 $tpl
 
 $tree
 
 $lng
 
 $data
 
 $object
 
 $ref_id
 
 $obj_id
 
 $maxcount
 
 $formaction
 
 $return_location
 
 $target_frame
 
 $tab_target_script
 
 $actions
 
 $sub_objects
 
 $omit_locator = false
 
const CFORM_NEW = 1
 
const CFORM_IMPORT = 2
 
const CFORM_CLONE = 3
 

Detailed Description

Repository settings.

Author
Jörg Lützenkirchen luetz.nosp@m.enki.nosp@m.rchen.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
$Id$

ilObjRepositorySettingsGUI: ilPermissionGUI

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

Constructor & Destructor Documentation

◆ __construct()

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

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

References $DIC, and settings().

28  {
29  global $DIC;
30 
31  $this->error = $DIC["ilErr"];
32  $this->access = $DIC->access();
33  $this->rbacsystem = $DIC->rbac()->system();
34  $this->settings = $DIC->settings();
35  $this->ctrl = $DIC->ctrl();
36  $this->lng = $DIC->language();
37  $this->toolbar = $DIC->toolbar();
38  parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
39 
40  $this->type = 'reps';
41  $this->lng->loadLanguageModule('rep');
42  $this->lng->loadLanguageModule('cmps');
43  }
settings()
Definition: settings.php:2
global $DIC
Definition: saml.php:7
+ Here is the call graph for this function:

Member Function Documentation

◆ addNewItemGroup()

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

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

References initNewItemGroupForm().

Referenced by saveNewItemGroup(), and updateNewItemGroup().

558  {
559  if (!$a_form) {
560  $a_form = $this->initNewItemGroupForm();
561  }
562 
563  $this->tpl->setContent($a_form->getHTML());
564  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addNewItemGroupSeparator()

ilObjRepositorySettingsGUI::addNewItemGroupSeparator ( )
protected

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

References ilObjRepositorySettings\addNewItemGroupSeparator().

629  {
630  include_once("Services/Repository/classes/class.ilObjRepositorySettings.php");
632  ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
633  }
634  $this->ctrl->redirect($this, "listNewItemGroups");
635  }
+ Here is the call graph for this function:

◆ addToExternalSettingsForm()

ilObjRepositorySettingsGUI::addToExternalSettingsForm (   $a_form_id)

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

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

713  {
715 
716  switch ($a_form_id) {
718 
719  require_once 'Services/Tracking/classes/class.ilChangeEvent.php';
720  $fields = array('trac_show_repository_views' => array(ilChangeEvent::_isActive(), ilAdministrationSettingsFormHandler::VALUE_BOOL));
721 
722  return array(array("view", $fields));
723 
724 
726 
727  $fields = array(
728  'adm_show_comments_tagging_in_lists' => array($ilSetting->get('comments_tagging_in_lists'), ilAdministrationSettingsFormHandler::VALUE_BOOL,
729  array('adm_show_comments_tagging_in_lists_tags' => array($ilSetting->get('comments_tagging_in_lists_tags'), ilAdministrationSettingsFormHandler::VALUE_BOOL))
730  ));
731 
732  return array(array("view", $fields));
733  }
734  }
global $ilSetting
Definition: privfeed.php:17
static _isActive()
Returns true, if change event tracking is active.
+ Here is the call graph for this function:

◆ confirmDeleteNewItemGroup()

ilObjRepositorySettingsGUI::confirmDeleteNewItemGroup ( )
protected

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

References $_POST, ilObjRepositorySettings\getNewItemGroups(), listNewItemGroups(), ilUtil\sendFailure(), and setModuleSubTabs().

671  {
672  if (!is_array($_POST["grp_id"])) {
673  ilUtil::sendFailure($this->lng->txt("select_one"));
674  return $this->listNewItemGroups();
675  }
676 
677  $this->setModuleSubTabs("new_item_groups");
678 
679  include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
680  $cgui = new ilConfirmationGUI();
681  $cgui->setHeaderText($this->lng->txt("rep_new_item_group_delete_sure"));
682 
683  $cgui->setFormAction($this->ctrl->getFormAction($this));
684  $cgui->setCancel($this->lng->txt("cancel"), "listNewItemGroups");
685  $cgui->setConfirm($this->lng->txt("confirm"), "deleteNewItemGroup");
686 
687  include_once("Services/Repository/classes/class.ilObjRepositorySettings.php");
689 
690  foreach ($_POST["grp_id"] as $grp_id) {
691  $cgui->addItem("grp_id[]", $grp_id, $groups[$grp_id]["title"]);
692  }
693 
694  $this->tpl->setContent($cgui->getHTML());
695  }
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
$_POST["username"]
Confirmation screen class.
+ Here is the call graph for this function:

◆ customIcons()

ilObjRepositorySettingsGUI::customIcons ( ilPropertyFormGUI  $a_form = null)

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

References initCustomIconsForm().

Referenced by saveCustomIcons().

337  {
338  $this->tabs_gui->activateTab("icons");
339 
340  if (!$a_form) {
341  $a_form = $this->initCustomIconsForm();
342  }
343 
344  $this->tpl->setContent($a_form->getHTML());
345  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ deleteNewItemGroup()

ilObjRepositorySettingsGUI::deleteNewItemGroup ( )
protected

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

References $_POST, ilObjRepositorySettings\deleteNewItemGroup(), and listNewItemGroups().

698  {
699  if (!is_array($_POST["grp_id"])) {
700  return $this->listNewItemGroups();
701  }
702 
703  include_once("Services/Repository/classes/class.ilObjRepositorySettings.php");
704  foreach ($_POST["grp_id"] as $grp_id) {
706  }
707 
708  ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
709  $this->ctrl->redirect($this, "listNewItemGroups");
710  }
$_POST["username"]
+ Here is the call graph for this function:

◆ editNewItemGroup()

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

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

References $_GET, and initNewItemGroupForm().

587  {
588  $grp_id = (int) $_GET["grp_id"];
589  if (!$grp_id) {
590  $this->ctrl->redirect($this, "listNewItemGroups");
591  }
592 
593  if (!$a_form) {
594  $this->ctrl->setParameter($this, "grp_id", $grp_id);
595  $a_form = $this->initNewItemGroupForm($grp_id);
596  }
597 
598  $this->tpl->setContent($a_form->getHTML());
599  }
$_GET["client_id"]
+ Here is the call graph for this function:

◆ executeCommand()

ilObjRepositorySettingsGUI::executeCommand ( )

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

References ilObjectGUI\$access, $error, ilObjectGUI\$ilErr, and ilObjectGUI\prepareOutput().

46  {
48  $ilAccess = $this->access;
49 
50  $next_class = $this->ctrl->getNextClass($this);
51  $cmd = $this->ctrl->getCmd();
52 
53  $this->prepareOutput();
54 
55  if (!$ilAccess->checkAccess('read', '', $this->object->getRefId())) {
56  $ilErr->raiseError($this->lng->txt('no_permission'), $ilErr->WARNING);
57  }
58 
59  switch ($next_class) {
60  case 'ilpermissiongui':
61  $this->tabs_gui->setTabActive('perm_settings');
62  include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
63  $perm_gui = new ilPermissionGUI($this);
64  $this->ctrl->forwardCommand($perm_gui);
65  break;
66 
67  default:
68  $this->$cmd();
69  break;
70  }
71  return true;
72  }
prepareOutput($a_show_subobjects=true)
prepare output
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
+ Here is the call graph for this function:

◆ getAdminTabs()

ilObjRepositorySettingsGUI::getAdminTabs ( )

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

References $rbacsystem.

75  {
77 
78  $this->tabs_gui->addTab(
79  "settings",
80  $this->lng->txt("settings"),
81  $this->ctrl->getLinkTarget($this, "view")
82  );
83 
84  $this->tabs_gui->addTab(
85  "icons",
86  $this->lng->txt("rep_custom_icons"),
87  $this->ctrl->getLinkTarget($this, "customIcons")
88  );
89 
90  $this->tabs_gui->addTab(
91  "modules",
92  $this->lng->txt("cmps_repository_object_types"),
93  $this->ctrl->getLinkTarget($this, "listModules")
94  );
95 
96  if ($rbacsystem->checkAccess('edit_permission', $this->object->getRefId())) {
97  $this->tabs_gui->addTab(
98  "perm_settings",
99  $this->lng->txt("perm_settings"),
100  $this->ctrl->getLinkTargetByClass('ilpermissiongui', "perm")
101  );
102  }
103  }

◆ initCustomIconsForm()

ilObjRepositorySettingsGUI::initCustomIconsForm ( )
protected

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

References ilObjectGUI\$access, $form, $ilSetting, ilObjectGUI\$settings, and ilFormPropertyGUI\setInfo().

Referenced by customIcons(), and saveCustomIcons().

348  {
350  $ilAccess = $this->access;
351 
352  include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
353  include_once "Services/Form/classes/class.ilCombinationInputGUI.php";
354  $form = new ilPropertyFormGUI();
355  $form->setTitle($this->lng->txt("rep_custom_icons"));
356  $form->setFormAction($this->ctrl->getFormAction($this, 'saveCustomIcons'));
357 
358  $cb = new ilCheckboxInputGUI($this->lng->txt("enable_custom_icons"), "custom_icons");
359  $cb->setInfo($this->lng->txt("enable_custom_icons_info"));
360  $cb->setChecked($ilSetting->get("custom_icons"));
361  $form->addItem($cb);
362 
363  if ($ilAccess->checkAccess('write', '', $this->object->getRefId())) {
364  $form->addCommandButton('saveCustomIcons', $this->lng->txt('save'));
365  }
366 
367  return $form;
368  }
This class represents a property form user interface.
This class represents a checkbox property in a property form.
setInfo($a_info)
Set Information Text.
if(isset($_POST['submit'])) $form
global $ilSetting
Definition: privfeed.php:17
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initNewItemGroupForm()

ilObjRepositorySettingsGUI::initNewItemGroupForm (   $a_grp_id = false)
protected

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

References $form, $id, $title, ilObjRepositorySettings\getNewItemGroups(), and setModuleSubTabs().

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

507  {
508  $this->setModuleSubTabs("new_item_groups");
509 
510  include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
511  $form = new ilPropertyFormGUI();
512 
513  $this->lng->loadLanguageModule("meta");
514  $def_lng = $this->lng->getDefaultLanguage();
515 
516  $title = new ilTextInputGUI($this->lng->txt("title"), "title_" . $def_lng);
517  $title->setInfo($this->lng->txt("meta_l_" . $def_lng) .
518  " (" . $this->lng->txt("default_language") . ")");
519  $title->setRequired(true);
520  $form->addItem($title);
521 
522  foreach ($this->lng->getInstalledLanguages() as $lang_id) {
523  if ($lang_id != $def_lng) {
524  $title = new ilTextInputGUI($this->lng->txt("translation"), "title_" . $lang_id);
525  $title->setInfo($this->lng->txt("meta_l_" . $lang_id));
526  $form->addItem($title);
527  }
528  }
529 
530  if (!$a_grp_id) {
531  $form->setTitle($this->lng->txt("rep_new_item_group_add"));
532  $form->setFormAction($this->ctrl->getFormAction($this, "saveNewItemGroup"));
533 
534  $form->addCommandButton("saveNewItemGroup", $this->lng->txt("save"));
535  } else {
536  $form->setTitle($this->lng->txt("rep_new_item_group_edit"));
537  $form->setFormAction($this->ctrl->getFormAction($this, "updateNewItemGroup"));
538 
539  include_once("Services/Repository/classes/class.ilObjRepositorySettings.php");
541  $grp = $grp[$a_grp_id];
542 
543  foreach ($grp["titles"] as $id => $value) {
544  $field = $form->getItemByPostVar("title_" . $id);
545  if ($field) {
546  $field->setValue($value);
547  }
548  }
549 
550  $form->addCommandButton("updateNewItemGroup", $this->lng->txt("save"));
551  }
552  $form->addCommandButton("listNewItemGroups", $this->lng->txt("cancel"));
553 
554  return $form;
555  }
This class represents a property form user interface.
if(!array_key_exists('StateId', $_REQUEST)) $id
if(isset($_POST['submit'])) $form
This class represents a text property in a property form.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initSettingsForm()

ilObjRepositorySettingsGUI::initSettingsForm ( )
protected

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

References ilObjectGUI\$access, $form, $ilSetting, PHPMailer\PHPMailer\$options, ilObjectGUI\$settings, $si, ilChangeEvent\_isActive(), ilAdministrationSettingsFormHandler\addFieldsToForm(), ilRadioOption\addSubItem(), ilAdministrationSettingsFormHandler\FORM_REPOSITORY, ilCheckboxInputGUI\setChecked(), ilRadioOption\setInfo(), ilFormPropertyGUI\setInfo(), ilNumberInputGUI\setMaxLength(), ilSelectInputGUI\setOptions(), ilCheckboxInputGUI\setValue(), ilNumberInputGUI\setValue(), and ilRadioGroupInputGUI\setValue().

Referenced by saveSettings(), and view().

117  {
119  $ilAccess = $this->access;
120 
121  include_once('Services/Form/classes/class.ilPropertyFormGUI.php');
122  $form = new ilPropertyFormGUI();
123  $form->setTitle($this->lng->txt("settings"));
124  $form->setFormAction($this->ctrl->getFormAction($this, 'saveSettings'));
125 
126  // default repository view
127  $options = array(
128  "flat" => $this->lng->txt("flatview"),
129  "tree" => $this->lng->txt("treeview")
130  );
131  $si = new ilSelectInputGUI($this->lng->txt("def_repository_view"), "default_rep_view");
132  $si->setOptions($options);
133  $si->setInfo($this->lng->txt(""));
134  if ($ilSetting->get("default_repository_view") == "tree") {
135  $si->setValue("tree");
136  } else {
137  $si->setValue("flat");
138  }
139  $form->addItem($si);
140 
141  //
142  $options = array(
143  "" => $this->lng->txt("adm_rep_tree_only_container"),
144  "tree" => $this->lng->txt("adm_all_resource_types")
145  );
146 
147  // repository tree
148  $radg = new ilRadioGroupInputGUI($this->lng->txt("adm_rep_tree_presentation"), "tree_pres");
149  $radg->setValue($ilSetting->get("repository_tree_pres"));
150  $op1 = new ilRadioOption(
151  $this->lng->txt("adm_rep_tree_only_cntr"),
152  "",
153  $this->lng->txt("adm_rep_tree_only_cntr_info")
154  );
155  $radg->addOption($op1);
156 
157  $op2 = new ilRadioOption(
158  $this->lng->txt("adm_rep_tree_all_types"),
159  "all_types",
160  $this->lng->txt("adm_rep_tree_all_types_info")
161  );
162 
163  // limit tree in courses and groups
164  $cb = new ilCheckboxInputGUI($this->lng->txt("adm_rep_tree_limit_grp_crs"), "rep_tree_limit_grp_crs");
165  $cb->setChecked($ilSetting->get("rep_tree_limit_grp_crs"));
166  $cb->setInfo($this->lng->txt("adm_rep_tree_limit_grp_crs_info"));
167  $op2->addSubItem($cb);
168 
169  $radg->addOption($op2);
170 
171  $form->addItem($radg);
172 
173  // limit items in tree
174  $tree_limit = new ilCheckboxInputGUI($this->lng->txt("rep_tree_limit"), "rep_tree_limit");
175  $tree_limit->setChecked($ilSetting->get("rep_tree_limit_number") > 0);
176  $tree_limit->setInfo($this->lng->txt("rep_tree_limit_info"));
177  $form->addItem($tree_limit);
178 
179  // limit items in tree (number)
180  $tree_limit_number = new ilNumberInputGUI($this->lng->txt("rep_tree_limit_number"), "rep_tree_limit_number");
181  $tree_limit_number->setMaxLength(3);
182  $tree_limit_number->setSize(3);
183  $tree_limit_number->setValue($ilSetting->get("rep_tree_limit_number"));
184  $tree_limit_number->setInfo($this->lng->txt("rep_tree_limit_number_info"));
185  $tree_limit->addSubItem($tree_limit_number);
186 
187  // breadcrumbs start with courses
188  $cb = new ilCheckboxInputGUI($this->lng->txt("rep_breadcr_crs"), "rep_breadcr_crs");
189  $cb->setChecked((int) $ilSetting->get("rep_breadcr_crs"));
190  $form->addItem($cb);
191 
192  $radg = new ilRadioGroupInputGUI($this->lng->txt("rep_breadcr_crs"), "rep_breadcr_crs_overwrite");
193  $radg->setValue((int) $ilSetting->get("rep_breadcr_crs_overwrite"));
194 
195  $op0 = new ilRadioOption($this->lng->txt("rep_breadcr_crs_overwrite"), 1);
196  $cb0 = new ilCheckboxInputGUI($this->lng->txt("rep_default"), "rep_breadcr_crs_default");
197  $cb0->setChecked((int) $ilSetting->get("rep_breadcr_crs_default"));
198  $op0->addSubItem($cb0);
199  $radg->addOption($op0);
200 
201  $op1 = new ilRadioOption($this->lng->txt("rep_breadcr_crs_overwrite_not"), 0);
202  $radg->addOption($op1);
203 
204 
205  $cb->addSubItem($radg);
206 
207 
208 
209  // trash
210  $cb = new ilCheckboxInputGUI($this->lng->txt("enable_trash"), "enable_trash");
211  $cb->setInfo($this->lng->txt("enable_trash_info"));
212  if ($ilSetting->get("enable_trash")) {
213  $cb->setChecked(true);
214  }
215  $form->addItem($cb);
216 
217  // change event
218  require_once 'Services/Tracking/classes/class.ilChangeEvent.php';
219  $this->lng->loadLanguageModule("trac");
220  $event = new ilCheckboxInputGUI($this->lng->txt('trac_show_repository_views'), 'change_event_tracking');
221  $event->setInfo($this->lng->txt("trac_show_repository_views_info"));
222  $event->setChecked(ilChangeEvent::_isActive());
223  $form->addItem($event);
224 
225 
226  include_once "Services/Administration/classes/class.ilAdministrationSettingsFormHandler.php";
229  $form,
230  $this
231  );
232 
233 
234  // object lists
235 
236  $lists = new ilFormSectionHeaderGUI();
237  $lists->setTitle($this->lng->txt("rep_object_lists"));
238  $form->addItem($lists);
239 
240  $sdesc = new ilCheckboxInputGUI($this->lng->txt("adm_rep_shorten_description"), "rep_shorten_description");
241  $sdesc->setInfo($this->lng->txt("adm_rep_shorten_description_info"));
242  $sdesc->setChecked($ilSetting->get("rep_shorten_description"));
243  $form->addItem($sdesc);
244 
245  $sdesclen = new ilNumberInputGUI($this->lng->txt("adm_rep_shorten_description_length"), "rep_shorten_description_length");
246  $sdesclen->setValue($ilSetting->get("rep_shorten_description_length"));
247  $sdesclen->setSize(3);
248  $sdesc->addSubItem($sdesclen);
249 
250  // load action commands asynchronously
251  $cb = new ilCheckboxInputGUI($this->lng->txt("adm_item_cmd_asynch"), "item_cmd_asynch");
252  $cb->setInfo($this->lng->txt("adm_item_cmd_asynch_info"));
253  $cb->setChecked($ilSetting->get("item_cmd_asynch"));
254  $form->addItem($cb);
255 
256  // notes/comments/tagging
257  $pl = new ilCheckboxInputGUI($this->lng->txt('adm_show_comments_tagging_in_lists'), 'comments_tagging_in_lists');
258  $pl->setValue(1);
259  $pl->setChecked($ilSetting->get('comments_tagging_in_lists'));
260  $form->addItem($pl);
261 
262  $pltags = new ilCheckboxInputGUI($this->lng->txt('adm_show_comments_tagging_in_lists_tags'), 'comments_tagging_in_lists_tags');
263  $pltags->setValue(1);
264  $pltags->setChecked($ilSetting->get('comments_tagging_in_lists_tags'));
265  $pl->addSubItem($pltags);
266 
267  if ($ilAccess->checkAccess('write', '', $this->object->getRefId())) {
268  $form->addCommandButton('saveSettings', $this->lng->txt('save'));
269  }
270 
271  return $form;
272  }
This class represents an option in a radio group.
setValue($a_value)
Set Value.
This class represents a selection list property in a property form.
This class represents a property form user interface.
This class represents a section header in a property form.
This class represents a checkbox property in a property form.
setInfo($a_info)
Set Info.
static addFieldsToForm($a_form_id, ilPropertyFormGUI $a_form, ilObjectGUI $a_parent_gui)
setInfo($a_info)
Set Information Text.
setChecked($a_checked)
Set Checked.
This class represents a property in a property form.
if(isset($_POST['submit'])) $form
addSubItem($a_item)
Add Subitem.
This class represents a number property in a property form.
setValue($a_value)
Set Value.
setOptions($a_options)
Set Options.
setMaxLength($a_maxlength)
Set Max Length.
global $ilSetting
Definition: privfeed.php:17
static _isActive()
Returns true, if change event tracking is active.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ listModules()

ilObjRepositorySettingsGUI::listModules ( )
protected

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

References ilObjectGUI\$access, and setModuleSubTabs().

410  {
411  $ilAccess = $this->access;
412 
413  $this->setModuleSubTabs("list_mods");
414 
415  $has_write = $ilAccess->checkAccess('write', '', $this->object->getRefId());
416 
417  include_once("./Services/Repository/classes/class.ilModulesTableGUI.php");
418  $comp_table = new ilModulesTableGUI($this, "listModules", $has_write);
419 
420  $this->tpl->setContent($comp_table->getHTML());
421  }
TableGUI class for module listing.
+ Here is the call graph for this function:

◆ listNewItemGroups()

ilObjRepositorySettingsGUI::listNewItemGroups ( )
protected

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

References ilObjectGUI\$access, ilObjectGUI\$toolbar, and setModuleSubTabs().

Referenced by confirmDeleteNewItemGroup(), and deleteNewItemGroup().

480  {
481  $ilToolbar = $this->toolbar;
482  $ilAccess = $this->access;
483 
484  $this->setModuleSubTabs("new_item_groups");
485 
486  $has_write = $ilAccess->checkAccess('write', '', $this->object->getRefId());
487 
488  if ($has_write) {
489  $ilToolbar->addButton(
490  $this->lng->txt("rep_new_item_group_add"),
491  $this->ctrl->getLinkTarget($this, "addNewItemGroup")
492  );
493 
494  $ilToolbar->addButton(
495  $this->lng->txt("rep_new_item_group_add_separator"),
496  $this->ctrl->getLinkTarget($this, "addNewItemGroupSeparator")
497  );
498  }
499 
500  include_once("./Services/Repository/classes/class.ilNewItemGroupTableGUI.php");
501  $grp_table = new ilNewItemGroupTableGUI($this, "listNewItemGroups", $has_write);
502 
503  $this->tpl->setContent($grp_table->getHTML());
504  }
TableGUI class for new item groups.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveCustomIcons()

ilObjRepositorySettingsGUI::saveCustomIcons ( )

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

References ilObjectGUI\$access, $form, $ilSetting, ilObjectGUI\$settings, customIcons(), and initCustomIconsForm().

371  {
373  $ilAccess = $this->access;
374 
375  if (!$ilAccess->checkAccess('write', '', $this->object->getRefId())) {
376  $this->ctrl->redirect($this, "customIcons");
377  }
378 
379  $form = $this->initCustomIconsForm();
380  if ($form->checkInput()) {
381  $ilSetting->set("custom_icons", (int) $form->getInput("custom_icons"));
382  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
383  $this->ctrl->redirect($this, "customIcons");
384  }
385 
386  $form->setValuesByPost();
387  $this->customIcons($form);
388  }
customIcons(ilPropertyFormGUI $a_form=null)
if(isset($_POST['submit'])) $form
global $ilSetting
Definition: privfeed.php:17
+ Here is the call graph for this function:

◆ saveModules()

ilObjRepositorySettingsGUI::saveModules ( )
protected

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

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

424  {
427  $lng = $this->lng;
428  $ilAccess = $this->access;
429 
430  if (!is_array($_POST["obj_grp"]) ||
431  !is_array($_POST["obj_pos"]) ||
432  !$ilAccess->checkAccess('write', '', $this->object->getRefId())) {
433  $ilCtrl->redirect($this, "listModules");
434  }
435 
436  $grp_pos_map = array(0 => 9999);
437  include_once("Services/Repository/classes/class.ilObjRepositorySettings.php");
438  foreach (ilObjRepositorySettings::getNewItemGroups() as $item) {
439  $grp_pos_map[$item["id"]] = $item["pos"];
440  }
441 
442  $type_pos_map = array();
443  foreach ($_POST["obj_pos"] as $obj_type => $pos) {
444  $grp_id = (int) $_POST["obj_grp"][$obj_type];
445  $type_pos_map[$grp_id][$obj_type] = $pos;
446 
447  // enable creation?
448  $ilSetting->set("obj_dis_creation_" . $obj_type, !(int) $_POST["obj_enbl_creation"][$obj_type]);
449  }
450 
451  foreach ($type_pos_map as $grp_id => $obj_types) {
452  $grp_pos = str_pad($grp_pos_map[$grp_id], 4, "0", STR_PAD_LEFT);
453 
454  asort($obj_types);
455  $pos = 0;
456  foreach (array_keys($obj_types) as $obj_type) {
457  $pos += 10;
458  $type_pos = $grp_pos . str_pad($pos, 4, "0", STR_PAD_LEFT);
459  $ilSetting->set("obj_add_new_pos_" . $obj_type, $type_pos);
460  $ilSetting->set("obj_add_new_pos_grp_" . $obj_type, $grp_id);
461  }
462  }
463 
464  /*
465  if (count($double) == 0)
466  {
467  ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
468  }
469  else
470  {
471  ilUtil::sendInfo($lng->txt("cmps_duplicate_positions")." ".implode($double, ", "), true);
472  }
473  */
474 
475  ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
476  $ilCtrl->redirect($this, "listModules");
477  }
global $ilCtrl
Definition: ilias.php:18
global $ilSetting
Definition: privfeed.php:17
$_POST["username"]
+ Here is the call graph for this function:

◆ saveNewItemGroup()

ilObjRepositorySettingsGUI::saveNewItemGroup ( )
protected

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

References $form, ilObjRepositorySettings\addNewItemGroup(), addNewItemGroup(), and initNewItemGroupForm().

567  {
568  $form = $this->initNewItemGroupForm();
569  if ($form->checkInput()) {
570  $titles = array();
571  foreach ($this->lng->getInstalledLanguages() as $lang_id) {
572  $titles[$lang_id] = $form->getInput("title_" . $lang_id);
573  }
574 
575  include_once("Services/Repository/classes/class.ilObjRepositorySettings.php");
577  ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
578  $this->ctrl->redirect($this, "listNewItemGroups");
579  }
580  }
581 
582  $form->setValuesByPost();
583  $this->addNewItemGroup($form);
584  }
if(isset($_POST['submit'])) $form
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 637 of file class.ilObjRepositorySettingsGUI.php.

References $_POST, $ilSetting, ilObjectGUI\$settings, ilObjRepositorySettings\getNewItemGroups(), ilObjRepositorySettings\getNewItemGroupSubItems(), and ilObjRepositorySettings\updateNewItemGroupOrder().

638  {
640 
641  if (is_array($_POST["grp_order"])) {
642  include_once("Services/Repository/classes/class.ilObjRepositorySettings.php");
644 
645  $grp_pos_map = array();
646  include_once("Services/Repository/classes/class.ilObjRepositorySettings.php");
647  foreach (ilObjRepositorySettings::getNewItemGroups() as $item) {
648  $grp_pos_map[$item["id"]] = str_pad($item["pos"], 4, "0", STR_PAD_LEFT);
649  }
650 
651  // update order of assigned objects
652  foreach (ilObjRepositorySettings::getNewItemGroupSubItems() as $grp_id => $subitems) {
653  // unassigned objects will always be last
654  if ($grp_id) {
655  foreach ($subitems as $obj_type) {
656  $old_pos = $ilSetting->get("obj_add_new_pos_" . $obj_type);
657  if (strlen($old_pos) == 8) {
658  $new_pos = $grp_pos_map[$grp_id] . substr($old_pos, 4);
659  $ilSetting->set("obj_add_new_pos_" . $obj_type, $new_pos);
660  }
661  }
662  }
663  }
664 
665  ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
666  }
667  $this->ctrl->redirect($this, "listNewItemGroups");
668  }
static updateNewItemGroupOrder(array $a_order)
global $ilSetting
Definition: privfeed.php:17
$_POST["username"]
+ Here is the call graph for this function:

◆ saveSettings()

ilObjRepositorySettingsGUI::saveSettings ( )

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

References $_POST, ilObjectGUI\$access, $form, $ilSetting, ilObjectGUI\$settings, ilChangeEvent\_activate(), ilChangeEvent\_deactivate(), initSettingsForm(), and view().

275  {
277  $ilAccess = $this->access;
278 
279  if (!$ilAccess->checkAccess('write', '', $this->object->getRefId())) {
280  $this->ctrl->redirect($this, "view");
281  }
282 
283  $form = $this->initSettingsForm();
284  if ($form->checkInput()) {
285  $ilSetting->set("default_repository_view", $_POST["default_rep_view"]);
286 
287  $ilSetting->set("repository_tree_pres", $_POST["tree_pres"]);
288  if ($_POST["tree_pres"] == "") {
289  $_POST["rep_tree_limit_grp_crs"] = "";
290  }
291  if ($_POST["rep_tree_limit_grp_crs"] && !$ilSetting->get("rep_tree_limit_grp_crs")) {
292  $_POST["rep_tree_synchronize"] = true;
293  } elseif (!$_POST["rep_tree_synchronize"] && $ilSetting->get("rep_tree_synchronize")) {
294  $_POST["rep_tree_limit_grp_crs"] = false;
295  }
296  $ilSetting->set("rep_tree_limit_grp_crs", $_POST["rep_tree_limit_grp_crs"]);
297 
298  // $ilSetting->set('rep_cache',(int) $_POST['rep_cache']);
299  // $ilSetting->set("rep_tree_synchronize", $_POST["rep_tree_synchronize"]);
300 
301  $ilSetting->set("enable_trash", $_POST["enable_trash"]);
302 
303 
304  $ilSetting->set("rep_breadcr_crs_overwrite", (int) $_POST["rep_breadcr_crs_overwrite"]);
305  $ilSetting->set("rep_breadcr_crs", (int) $_POST["rep_breadcr_crs"]);
306  $ilSetting->set("rep_breadcr_crs_default", (int) $_POST["rep_breadcr_crs_default"]);
307 
308 
309  $ilSetting->set("rep_shorten_description", $form->getInput('rep_shorten_description'));
310  $ilSetting->set("rep_shorten_description_length", (int) $form->getInput('rep_shorten_description_length'));
311  $ilSetting->set('item_cmd_asynch', (int) $_POST['item_cmd_asynch']);
312  $ilSetting->set('comments_tagging_in_lists', (int) $_POST['comments_tagging_in_lists']);
313  $ilSetting->set('comments_tagging_in_lists_tags', (int) $_POST['comments_tagging_in_lists_tags']);
314 
315  // repository tree limit of children
316  $limit_number = ($_POST['rep_tree_limit'] && $_POST['rep_tree_limit_number'] > 0)
317  ? (int) $_POST['rep_tree_limit_number']
318  : 0;
319  $ilSetting->set('rep_tree_limit_number', $limit_number);
320 
321  require_once 'Services/Tracking/classes/class.ilChangeEvent.php';
322  if ($form->getInput('change_event_tracking')) {
324  } else {
326  }
327 
328  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
329  $this->ctrl->redirect($this, "view");
330  }
331 
332  $form->setValuesByPost();
333  $this->view($form);
334  }
view(ilPropertyFormGUI $a_form=null)
static _activate()
Activates change event tracking.
if(isset($_POST['submit'])) $form
global $ilSetting
Definition: privfeed.php:17
static _deactivate()
Deactivates change event tracking.
$_POST["username"]
+ Here is the call graph for this function:

◆ setModuleSubTabs()

ilObjRepositorySettingsGUI::setModuleSubTabs (   $a_active)
protected

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

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

391  {
392  $this->tabs_gui->activateTab('modules');
393 
394  $this->tabs_gui->addSubTab(
395  "list_mods",
396  $this->lng->txt("rep_new_item_menu"),
397  $this->ctrl->getLinkTarget($this, "listModules")
398  );
399 
400  $this->tabs_gui->addSubTab(
401  "new_item_groups",
402  $this->lng->txt("rep_new_item_groups"),
403  $this->ctrl->getLinkTarget($this, "listNewItemGroups")
404  );
405 
406  $this->tabs_gui->activateSubTab($a_active);
407  }
+ Here is the caller graph for this function:

◆ updateNewItemGroup()

ilObjRepositorySettingsGUI::updateNewItemGroup ( )
protected

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

References $_GET, $form, addNewItemGroup(), initNewItemGroupForm(), and ilObjRepositorySettings\updateNewItemGroup().

602  {
603  $grp_id = (int) $_GET["grp_id"];
604  if (!$grp_id) {
605  $this->ctrl->redirect($this, "listNewItemGroups");
606  }
607 
608  $this->ctrl->setParameter($this, "grp_id", $grp_id);
609 
610  $form = $this->initNewItemGroupForm($grp_id);
611  if ($form->checkInput()) {
612  $titles = array();
613  foreach ($this->lng->getInstalledLanguages() as $lang_id) {
614  $titles[$lang_id] = $form->getInput("title_" . $lang_id);
615  }
616 
617  include_once("Services/Repository/classes/class.ilObjRepositorySettings.php");
618  if (ilObjRepositorySettings::updateNewItemGroup($grp_id, $titles)) {
619  ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
620  $this->ctrl->redirect($this, "listNewItemGroups");
621  }
622  }
623 
624  $form->setValuesByPost();
625  $this->addNewItemGroup($form);
626  }
$_GET["client_id"]
if(isset($_POST['submit'])) $form
static updateNewItemGroup($a_id, array $a_titles)
addNewItemGroup(ilPropertyFormGUI $a_form=null)
+ Here is the call graph for this function:

◆ view()

ilObjRepositorySettingsGUI::view ( ilPropertyFormGUI  $a_form = null)

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

References initSettingsForm().

Referenced by saveSettings().

106  {
107  $this->tabs_gui->activateTab("settings");
108 
109  if (!$a_form) {
110  $a_form = $this->initSettingsForm();
111  }
112 
113  $this->tpl->setContent($a_form->getHTML());
114  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $error

ilObjRepositorySettingsGUI::$error
protected

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

Referenced by executeCommand().

◆ $rbacsystem

ilObjRepositorySettingsGUI::$rbacsystem
protected

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

Referenced by getAdminTabs().


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