ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilObjHelpSettingsGUI Class Reference

Help settings gui class. More...

+ Inheritance diagram for ilObjHelpSettingsGUI:
+ Collaboration diagram for ilObjHelpSettingsGUI:

Public Member Functions

 __construct (int $a_id=0, int $a_id_type=self::REPOSITORY_NODE_ID, int $a_parent_node_id=0)
 
 getType ()
 
 executeCommand ()
 
 editSettings ()
 
 getAdminTabs ()
 
 uploadHelpFile ()
 
 confirmHelpModulesDeletion ()
 
 deleteHelpModules ()
 
 activateModule ()
 
 deactivateModule ()
 
 setMode ()
 
- Public Member Functions inherited from ilObject2GUI
 __construct (int $id=0, int $id_type=self::REPOSITORY_NODE_ID, int $parent_node_id=0)
 
 executeCommand ()
 execute command More...
 
 getIdType ()
 
 delete ()
 Display delete confirmation form (repository/workspace switch) More...
 
 confirmedDelete ()
 Delete objects (repository/workspace switch) More...
 
 getHTML ()
 
 withReferences ()
 Final/Private declaration of unchanged parent methods. More...
 
 setCreationMode (bool $mode=true)
 
 getCreationMode ()
 
 prepareOutput (bool $show_sub_objects=true)
 
 isVisible (int $ref_id, string $type)
 
 setColumnSettings (ilColumnGUI $column_gui)
 
 cancelDelete ()
 
 view ()
 view object content (repository/workspace switch) More...
 
 getType ()
 Functions that must be overwritten. More...
 
 create ()
 CRUD. More...
 
 save ()
 
 edit ()
 
 update ()
 
 cancel ()
 
 importFile ()
 
 putObjectInTree (ilObject $obj, int $parent_node_id=null)
 Add object to tree at given position. More...
 
- 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] don't belong to the current 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...
 
 cancelDeleteObject ()
 cancel deletion of object More...
 
 cancelObject ()
 cancel action and go back to previous page More...
 
 createObject ()
 create new object form More...
 
 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 Attributes

StandardGUIRequest $help_request
 
ilTabsGUI $tabs
 
- Protected Attributes inherited from ilObject2GUI
ilObjectDefinition $obj_definition
 
ilGlobalTemplateInterface $tpl
 
ilCtrl $ctrl
 
ilLanguage $lng
 
ilTabsGUI $tabs_gui
 
ilObjectService $object_service
 
ilFavouritesManager $favourites
 
ilErrorHandling $error
 
ilLocatorGUI $locator
 
ilObjUser $user
 
ilAccessHandler $access
 
ilToolbarGUI $toolbar
 
ArrayBasedRequestWrapper $post_wrapper
 
RequestWrapper $request_wrapper
 
Factory $refinery
 
ilRbacAdmin $rbac_admin
 
ilRbacSystem $rbac_system
 
ilRbacReview $rbac_review
 
int $request_ref_id
 
int $id_type
 
int $parent_id
 
string $type
 
string $html
 
int $object_id
 
int $node_id = null
 
array $creation_forms = array()
 
 $access_handler
 
- 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
 
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 ilObject2GUI
static handleAfterSaveCallback (ilObject $obj, ?int $callback_ref_id)
 After creation callback. More...
 
- 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 ilObject2GUI
const OBJECT_ID = 0
 
const REPOSITORY_NODE_ID = 1
 
const WORKSPACE_NODE_ID = 2
 
const REPOSITORY_OBJECT_ID = 3
 
const WORKSPACE_OBJECT_ID = 4
 
const PORTFOLIO_OBJECT_ID = 5
 
- 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
 
- Protected Member Functions inherited from ilObject2GUI
 afterConstructor ()
 Do anything that should be done after constructor in here. More...
 
 assignObject ()
 create object instance as internal property (repository/workspace switch) More...
 
 getAccessHandler ()
 
 setLocator ()
 set Locator More...
 
 deleteConfirmedObjects ()
 Delete objects (workspace specific) This should probably be moved elsewhere as done with RepUtil. More...
 
 setTitleAndDescription ()
 
 omitLocator (bool $omit=true)
 
 getTargetFrame (string $cmd, string $target_frame="")
 
 setTargetFrame (string $cmd, string $target_frame)
 
 getCenterColumnHTML ()
 
 getRightColumnHTML ()
 
 checkPermission (string $perm, string $cmd="", string $type="", int $ref_id=null)
 
 showPossibleSubObjects ()
 
 redirectToRefId (int $ref_id, string $cmd="")
 
 fillCloneTemplate (?string $tpl_varname, string $type)
 
 addAdminLocatorItems (bool $do_not_add_object=false)
 
 setTabs ()
 create tabs (repository/workspace switch) More...
 
 getReturnLocation (string $cmd, string $location="")
 Deprecated functions. More...
 
 setReturnLocation (string $cmd, string $location)
 
 showActions ()
 
 getTabs ()
 
 addLocatorItems ()
 Functions to be overwritten. More...
 
 initCreationForms (string $new_type)
 Init creation forms. More...
 
 checkPermissionBool (string $perm, string $cmd="", string $type="", ?int $node_id=null)
 
 initHeaderAction (?string $sub_type=null, ?int $sub_id=null)
 Add header action menu. More...
 
 redrawHeaderAction ()
 Updating icons after ajax call. More...
 
 getPermanentLinkWidget (string $append=null, bool $center=false)
 
- Protected Member Functions inherited from ilObjectGUI
 getObjectService ()
 
 assignObject ()
 
 setTitleAndDescription ()
 
 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...
 
 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...
 
 fillCloneTemplate (?string $tpl_name, string $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...
 
 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...
 
 showCustomIconsEditing ( $input_colspan=1, ilPropertyFormGUI $form=null, $as_section=true)
 show edit section of custom icons for container More...
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilObjHelpSettingsGUI::__construct ( int  $a_id = 0,
int  $a_id_type = self::REPOSITORY_NODE_ID,
int  $a_parent_node_id = 0 
)

Definition at line 33 of file class.ilObjHelpSettingsGUI.php.

References $DIC, ILIAS\GlobalScreen\Provider\__construct(), ILIAS\Repository\access(), ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), ILIAS\Repository\settings(), ILIAS\Repository\tabs(), and ILIAS\Repository\toolbar().

37  {
38  global $DIC;
39  parent::__construct($a_id, $a_id_type, $a_parent_node_id);
40 
41  $this->access = $DIC->access();
42  $this->lng = $DIC->language();
43  $this->ctrl = $DIC->ctrl();
44  $this->settings = $DIC->settings();
45  $this->tabs = $DIC->tabs();
46  $this->toolbar = $DIC->toolbar();
47  $this->tpl = $DIC["tpl"];
48 
49  $this->help_request = new StandardGUIRequest(
50  $DIC->http(),
51  $DIC->refinery()
52  );
53  }
global $DIC
Definition: feed.php:28
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ activateModule()

ilObjHelpSettingsGUI::activateModule ( )

Definition at line 212 of file class.ilObjHelpSettingsGUI.php.

References ilObject2GUI\$ctrl, $ilSetting, ilObject2GUI\$lng, ilObjectGUI\$settings, ilObject2GUI\checkPermission(), and ilLanguage\txt().

212  : void
213  {
215  $lng = $this->lng;
216  $ilCtrl = $this->ctrl;
217 
218  $this->checkPermission("write");
219 
220  $ilSetting->set("help_module", $this->help_request->getHelpModuleId());
221  $this->tpl->setOnScreenMessage('success', $lng->txt("msg_obj_modified"), true);
222  $ilCtrl->redirect($this, "editSettings");
223  }
checkPermission(string $perm, string $cmd="", string $type="", int $ref_id=null)
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...
global $ilSetting
Definition: privfeed.php:17
ilSetting $settings
+ Here is the call graph for this function:

◆ confirmHelpModulesDeletion()

ilObjHelpSettingsGUI::confirmHelpModulesDeletion ( )

Definition at line 170 of file class.ilObjHelpSettingsGUI.php.

References ilObject2GUI\$ctrl, $i, ilObject2GUI\$lng, ilObject2GUI\$tpl, ilObject2GUI\checkPermission(), ilGlobalTemplateInterface\setContent(), and ilLanguage\txt().

170  : void
171  {
172  $ilCtrl = $this->ctrl;
173  $tpl = $this->tpl;
174  $lng = $this->lng;
175 
176  $this->checkPermission("write");
177 
178  $ids = $this->help_request->getIds();
179 
180  if (count($ids) === 0) {
181  $this->tpl->setOnScreenMessage('info', $lng->txt("no_checkbox"), true);
182  $ilCtrl->redirect($this, "editSettings");
183  } else {
184  $cgui = new ilConfirmationGUI();
185  $cgui->setFormAction($ilCtrl->getFormAction($this));
186  $cgui->setHeaderText($lng->txt("help_sure_delete_help_modules"));
187  $cgui->setCancel($lng->txt("cancel"), "editSettings");
188  $cgui->setConfirm($lng->txt("delete"), "deleteHelpModules");
189 
190  foreach ($ids as $i) {
191  $cgui->addItem("id[]", $i, $this->object::lookupModuleTitle($i));
192  }
193 
194  $tpl->setContent($cgui->getHTML());
195  }
196  }
checkPermission(string $perm, string $cmd="", string $type="", int $ref_id=null)
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...
setContent(string $a_html)
Sets content for standard template.
ilGlobalTemplateInterface $tpl
$i
Definition: metadata.php:41
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:

◆ deactivateModule()

ilObjHelpSettingsGUI::deactivateModule ( )

Definition at line 225 of file class.ilObjHelpSettingsGUI.php.

References ilObject2GUI\$ctrl, $ilSetting, ilObject2GUI\$lng, ilObjectGUI\$settings, ilObject2GUI\checkPermission(), and ilLanguage\txt().

225  : void
226  {
228  $lng = $this->lng;
229  $ilCtrl = $this->ctrl;
230 
231  $this->checkPermission("write");
232 
233  if ((int) $ilSetting->get("help_module") === $this->help_request->getHelpModuleId()) {
234  $ilSetting->set("help_module", "");
235  $this->tpl->setOnScreenMessage('success', $lng->txt("msg_obj_modified"), true);
236  }
237  $ilCtrl->redirect($this, "editSettings");
238  }
checkPermission(string $perm, string $cmd="", string $type="", int $ref_id=null)
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...
global $ilSetting
Definition: privfeed.php:17
ilSetting $settings
+ Here is the call graph for this function:

◆ deleteHelpModules()

ilObjHelpSettingsGUI::deleteHelpModules ( )

Definition at line 198 of file class.ilObjHelpSettingsGUI.php.

References ilObject2GUI\$ctrl, $i, and ilObject2GUI\checkPermission().

198  : void
199  {
200  $ilCtrl = $this->ctrl;
201 
202  $this->checkPermission("write");
203 
204  $ids = $this->help_request->getIds();
205  foreach ($ids as $i) {
206  $this->object->deleteModule((int) $i);
207  }
208 
209  $ilCtrl->redirect($this, "editSettings");
210  }
checkPermission(string $perm, string $cmd="", string $type="", int $ref_id=null)
$i
Definition: metadata.php:41
+ Here is the call graph for this function:

◆ editSettings()

ilObjHelpSettingsGUI::editSettings ( )

Definition at line 91 of file class.ilObjHelpSettingsGUI.php.

References ilObject2GUI\$ctrl, $ilSetting, ilObject2GUI\$lng, ilObjectGUI\$settings, $tabs, ilObject2GUI\$toolbar, ilObject2GUI\checkPermissionBool(), ILIAS\Repository\lng(), ilFileInputGUI\setSuffixes(), and ilLanguage\txt().

91  : void
92  {
93  $ilCtrl = $this->ctrl;
94  $lng = $this->lng;
96  $ilTabs = $this->tabs;
97  $ilToolbar = $this->toolbar;
98 
99  $ilTabs->activateTab("settings");
100 
101  if ((int) OH_REF_ID > 0) {
102  $this->tpl->setOnScreenMessage('info', "This installation is used for online help authoring. Help modules cannot be imported.");
103  return;
104  }
105 
106  if ($this->checkPermissionBool("write")) {
107  // help file
108  $fi = new ilFileInputGUI($lng->txt("help_help_file"), "help_file");
109  $fi->setSuffixes(array("zip"));
110  $ilToolbar->addInputItem($fi, true);
111  $ilToolbar->addFormButton($lng->txt("upload"), "uploadHelpFile");
112  $ilToolbar->addSeparator();
113 
114  // help mode
115  $options = array(
116  "" => $lng->txt("help_tooltips_and_help"),
117  "1" => $lng->txt("help_help_only"),
118  "2" => $lng->txt("help_tooltips_only")
119  );
120  $si = new ilSelectInputGUI($this->lng->txt("help_mode"), "help_mode");
121  $si->setOptions($options);
122  $si->setValue($ilSetting->get("help_mode"));
123  $ilToolbar->addInputItem($si);
124 
125  $ilToolbar->addFormButton($lng->txt("help_set_mode"), "setMode");
126  }
127  $ilToolbar->setFormAction($ilCtrl->getFormAction($this), true);
128 
129  $tab = new ilHelpModuleTableGUI($this, "editSettings", $this->checkPermissionBool("write"));
130 
131  $this->tpl->setContent($tab->getHTML());
132  }
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...
This class represents a file property in a property form.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setSuffixes(array $a_suffixes)
ilToolbarGUI $toolbar
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $node_id=null)
global $ilSetting
Definition: privfeed.php:17
ilSetting $settings
+ Here is the call graph for this function:

◆ executeCommand()

ilObjHelpSettingsGUI::executeCommand ( )

Definition at line 60 of file class.ilObjHelpSettingsGUI.php.

References ilObject2GUI\$lng, ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), ilLanguage\loadLanguageModule(), and ilObject2GUI\prepareOutput().

60  : void
61  {
62  $lng = $this->lng;
63  $lng->loadLanguageModule("help");
64 
65  $next_class = $this->ctrl->getNextClass($this);
66  $cmd = $this->ctrl->getCmd();
67 
68  $this->prepareOutput();
69 
70  if (!$this->rbac_system->checkAccess("visible,read", $this->object->getRefId())) {
71  throw new ilPermissionException($this->lng->txt('no_permission'));
72  }
73 
74  switch ($next_class) {
75  case 'ilpermissiongui':
76  $this->tabs_gui->setTabActive('perm_settings');
77  $perm_gui = new ilPermissionGUI($this);
78  $this->ctrl->forwardCommand($perm_gui);
79  break;
80 
81  default:
82  if (!$cmd || $cmd === 'view') {
83  $cmd = "editSettings";
84  }
85 
86  $this->$cmd();
87  break;
88  }
89  }
prepareOutput(bool $show_sub_objects=true)
loadLanguageModule(string $a_module)
Load language module.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
+ Here is the call graph for this function:

◆ getAdminTabs()

ilObjHelpSettingsGUI::getAdminTabs ( )

Definition at line 134 of file class.ilObjHelpSettingsGUI.php.

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

134  : void
135  {
136  if ($this->checkPermissionBool("visible,read")) {
137  $this->tabs_gui->addTab(
138  "settings",
139  $this->lng->txt("settings"),
140  $this->ctrl->getLinkTarget($this, "editSettings")
141  );
142  }
143 
144  if ($this->checkPermissionBool("edit_permission")) {
145  $this->tabs_gui->addTab(
146  "perm_settings",
147  $this->lng->txt("perm_settings"),
148  $this->ctrl->getLinkTargetByClass(array(get_class($this),'ilpermissiongui'), "perm")
149  );
150  }
151  }
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $node_id=null)
+ Here is the call graph for this function:

◆ getType()

ilObjHelpSettingsGUI::getType ( )

Definition at line 55 of file class.ilObjHelpSettingsGUI.php.

55  : string
56  {
57  return "hlps";
58  }

◆ setMode()

ilObjHelpSettingsGUI::setMode ( )

Definition at line 240 of file class.ilObjHelpSettingsGUI.php.

References ilObject2GUI\$ctrl, $ilSetting, ilObject2GUI\$lng, ilObjectGUI\$settings, ilObject2GUI\checkPermission(), ilObject2GUI\checkPermissionBool(), and ilLanguage\txt().

240  : void
241  {
242  $lng = $this->lng;
243  $ilCtrl = $this->ctrl;
245 
246  $this->checkPermission("write");
247 
248  if ($this->checkPermissionBool("write")) {
249  $ilSetting->set(
250  "help_mode",
251  $this->help_request->getHelpMode()
252  );
253  $this->tpl->setOnScreenMessage('success', $lng->txt("msg_obj_modified"), true);
254  }
255 
256  $ilCtrl->redirect($this, "editSettings");
257  }
checkPermission(string $perm, string $cmd="", string $type="", int $ref_id=null)
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...
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $node_id=null)
global $ilSetting
Definition: privfeed.php:17
ilSetting $settings
+ Here is the call graph for this function:

◆ uploadHelpFile()

ilObjHelpSettingsGUI::uploadHelpFile ( )

Definition at line 153 of file class.ilObjHelpSettingsGUI.php.

References ilObject2GUI\$ctrl, ilObject2GUI\$lng, ilObject2GUI\checkPermissionBool(), ilCtrl\redirect(), and ilLanguage\txt().

153  : void
154  {
155  $lng = $this->lng;
156  $ilCtrl = $this->ctrl;
157 
158  if (!isset($_FILES["help_file"]["tmp_name"]) || $_FILES["help_file"]["tmp_name"] === "") {
159  $this->tpl->setOnScreenMessage('failure', $lng->txt("help_select_a_file"), true);
160  $ilCtrl->redirect($this, "editSettings");
161  }
162  if ($this->checkPermissionBool("write")) {
163  $this->object->uploadHelpModule($_FILES["help_file"]);
164  $this->tpl->setOnScreenMessage('success', $lng->txt("help_module_uploaded"), true);
165  }
166 
167  $ilCtrl->redirect($this, "editSettings");
168  }
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...
redirect(object $a_gui_obj, string $a_cmd=null, string $a_anchor=null, bool $is_async=false)
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $node_id=null)
+ Here is the call graph for this function:

Field Documentation

◆ $help_request

StandardGUIRequest ilObjHelpSettingsGUI::$help_request
protected

Definition at line 30 of file class.ilObjHelpSettingsGUI.php.

◆ $tabs

ilTabsGUI ilObjHelpSettingsGUI::$tabs
protected

Definition at line 31 of file class.ilObjHelpSettingsGUI.php.

Referenced by editSettings().


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