ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilObjLoggingSettingsGUI Class Reference
+ Inheritance diagram for ilObjLoggingSettingsGUI:
+ Collaboration diagram for ilObjLoggingSettingsGUI:

Public Member Functions

 __construct ($a_data, $a_id, $a_call_by_reference, $a_prepare_output=true)
 Constructor. More...
 
 getLogger ()
 
 executeCommand ()
 Execute command. More...
 
 getAdminTabs ()
 Get tabs. More...
 
 setSubTabs ($a_section)
 
 getSettings ()
 Get log settings. More...
 
 settings (ilPropertyFormGUI $form=null)
 Show settings @access public. More...
 
 updateSettings ()
 Save settings @access public. More...
 
- 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 @access 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...
 

Data Fields

const SECTION_SETTINGS = 'settings'
 
const SUB_SECTION_MAIN = 'log_general_settings'
 
const SUB_SECTION_COMPONENTS = 'log_components'
 
const SUB_SECTION_ERROR = 'log_error_settings'
 
 $tpl
 
 $lng
 
 $ctrl
 
- 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
 

Protected Member Functions

 initSettings ()
 
 initFormSettings ()
 Init settings form. More...
 
 components ()
 Show components. More...
 
 saveComponentLevels ()
 Save form. More...
 
 resetComponentLevels ()
 
 errorSettings ()
 
 updateErrorSettings ()
 
 initFormErrorSettings ()
 
 initErrorSettings ()
 
 getErrorSettings ()
 
- 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 @access public More...
 
 setAdminTabs ()
 set admin tabs @access 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

 $tabs_gui
 
 $form
 
 $settings
 
 $log
 
- 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...
 

Detailed Description

Author
Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
$Id$

@ilCtrl_Calls ilObjLoggingSettingsGUI: ilPermissionGUI

Definition at line 14 of file class.ilObjLoggingSettingsGUI.php.

Constructor & Destructor Documentation

◆ __construct()

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

Constructor.

@access public

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

40 {
41 global $DIC;
42
43 $lng = $DIC['lng'];
44 $tpl = $DIC['tpl'];
45 $ilCtrl = $DIC['ilCtrl'];
46 $ilTabs = $DIC['ilTabs'];
47
48 $this->type = 'logs';
49 parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
50
51 $this->lng = $lng;
52
53 $this->tpl = $tpl;
54 $this->lng = $lng;
55 $this->ctrl = $ilCtrl;
56 $this->tabs_gui = $ilTabs;
57
58 $this->initSettings();
59 $this->initErrorSettings();
60 $this->lng->loadLanguageModule('logging');
61 $this->lng->loadLanguageModule('log');
62
63 include_once './Services/Logging/classes/public/class.ilLoggerFactory.php';
64 $this->log = ilLoggerFactory::getLogger('log');
65 }
static getLogger($a_component_id)
Get component logger.
global $ilCtrl
Definition: ilias.php:18
global $DIC
Definition: saml.php:7

References $DIC, $ilCtrl, $lng, $tpl, ilLoggerFactory\getLogger(), initErrorSettings(), and initSettings().

+ Here is the call graph for this function:

Member Function Documentation

◆ components()

ilObjLoggingSettingsGUI::components ( )
protected

Show components.

Definition at line 308 of file class.ilObjLoggingSettingsGUI.php.

309 {
310 $this->tabs_gui->activateTab(static::SECTION_SETTINGS);
311 $this->setSubTabs(static::SUB_SECTION_COMPONENTS);
312
313 include_once './Services/Logging/classes/class.ilLogComponentTableGUI.php';
314 $table = new ilLogComponentTableGUI($this, 'components');
315 $table->setEditable($this->checkPermissionBool('write'));
316 $table->init();
317 $table->parse();
318
319 $GLOBALS['DIC']['tpl']->setContent($table->getHTML());
320 }
Component logger with individual log levels by component id.
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission.
$GLOBALS['JPEG_Segment_Names']
Global Variable: XMP_tag_captions.
if(empty($password)) $table
Definition: pwgen.php:24

References $GLOBALS, $table, ilObjectGUI\checkPermissionBool(), and setSubTabs().

+ Here is the call graph for this function:

◆ errorSettings()

ilObjLoggingSettingsGUI::errorSettings ( )
protected

Definition at line 353 of file class.ilObjLoggingSettingsGUI.php.

354 {
355 global $DIC;
356
357 $ilAccess = $DIC['ilAccess'];
358 $ilErr = $DIC['ilErr'];
359
360 if (!$ilAccess->checkAccess('read', '', $this->object->getRefId())) {
361 $ilErr->raiseError($this->lng->txt('permission_denied'), $ilErr->MESSAGE);
362 }
363
364 $this->tabs_gui->setTabActive(static::SECTION_SETTINGS);
365 $this->setSubTabs(static::SUB_SECTION_ERROR);
366
367 if (!$form instanceof ilPropertyFormGUI) {
368 $form = $this->initFormErrorSettings();
369 }
370 $this->tpl->setContent($form->getHTML());
371
372 $this->getLogger()->debug('Currrent level is ' . $this->getSettings()->getLevel());
373 }
This class represents a property form user interface.

References $DIC, $form, ilObjectGUI\$ilErr, getLogger(), getSettings(), initFormErrorSettings(), and setSubTabs().

Referenced by updateErrorSettings().

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

◆ executeCommand()

ilObjLoggingSettingsGUI::executeCommand ( )

Execute command.

@access public

Reimplemented from ilObjectGUI.

Definition at line 82 of file class.ilObjLoggingSettingsGUI.php.

83 {
84 $next_class = $this->ctrl->getNextClass($this);
85 $cmd = $this->ctrl->getCmd();
86 $this->prepareOutput();
87
88 switch ($next_class) {
89 case 'ilpermissiongui':
90 $this->tabs_gui->setTabActive('perm_settings');
91 include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
92 $perm_gui = new ilPermissionGUI($this);
93 $ret = &$this->ctrl->forwardCommand($perm_gui);
94 break;
95
96 default:
97 if ($cmd == "" || $cmd == "view") {
98 $cmd = "settings";
99 }
100 $this->$cmd();
101
102 break;
103 }
104 return true;
105 }
prepareOutput($a_show_subobjects=true)
prepare output
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
$ret
Definition: parser.php:6

References $ret, and ilObjectGUI\prepareOutput().

+ Here is the call graph for this function:

◆ getAdminTabs()

ilObjLoggingSettingsGUI::getAdminTabs ( )

Get tabs.

@access public

Reimplemented from ilObjectGUI.

Definition at line 114 of file class.ilObjLoggingSettingsGUI.php.

115 {
116 global $DIC;
117
118 $ilAccess = $DIC['ilAccess'];
119
120 if ($ilAccess->checkAccess("read", '', $this->object->getRefId())) {
121 $this->tabs_gui->addTarget(
122 static::SECTION_SETTINGS,
123 $this->ctrl->getLinkTargetByClass('ilobjloggingsettingsgui', "settings")
124 );
125 }
126 if ($ilAccess->checkAccess('edit_permission', '', $this->object->getRefId())) {
127 $this->tabs_gui->addTarget(
128 "perm_settings",
129 $this->ctrl->getLinkTargetByClass('ilpermissiongui', "perm")
130 );
131 }
132 }

References $DIC.

◆ getErrorSettings()

ilObjLoggingSettingsGUI::getErrorSettings ( )
protected

Definition at line 435 of file class.ilObjLoggingSettingsGUI.php.

436 {
437 return $this->error_settings;
438 }

Referenced by initFormErrorSettings(), and updateErrorSettings().

+ Here is the caller graph for this function:

◆ getLogger()

ilObjLoggingSettingsGUI::getLogger ( )
Returns
ilLogger

Definition at line 71 of file class.ilObjLoggingSettingsGUI.php.

References $log.

Referenced by errorSettings(), initFormSettings(), settings(), and updateSettings().

+ Here is the caller graph for this function:

◆ getSettings()

ilObjLoggingSettingsGUI::getSettings ( )

Get log settings.

Returns
ilLogSettings

Definition at line 165 of file class.ilObjLoggingSettingsGUI.php.

References $settings.

Referenced by errorSettings(), initFormSettings(), settings(), and updateSettings().

+ Here is the caller graph for this function:

◆ initErrorSettings()

ilObjLoggingSettingsGUI::initErrorSettings ( )
protected

Definition at line 429 of file class.ilObjLoggingSettingsGUI.php.

430 {
431 require_once("Services/Logging/classes/error/class.ilLoggingErrorSettings.php");
432 $this->error_settings = ilLoggingErrorSettings::getInstance();
433 }

References ilLoggingErrorSettings\getInstance().

Referenced by __construct().

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

◆ initFormErrorSettings()

ilObjLoggingSettingsGUI::initFormErrorSettings ( )
protected

Definition at line 399 of file class.ilObjLoggingSettingsGUI.php.

400 {
401 global $DIC;
402
403 $lng = $DIC['lng'];
404 $ilDB = $DIC['ilDB'];
405 $ilAccess = $DIC['ilAccess'];
406
407 require_once './Services/Form/classes/class.ilPropertyFormGUI.php';
408 require_once './Services/Search/classes/class.ilSearchSettings.php';
409
410 $form = new ilPropertyFormGUI();
411 $form->setTitle($this->lng->txt('logs_settings'));
412 $form->setFormAction($this->ctrl->getFormAction($this));
413
414 if ($ilAccess->checkAccess('write', '', $this->object->getRefId())) {
415 $form->addCommandButton('updateErrorSettings', $this->lng->txt('save'));
416 }
417
418 $folder = new ilNonEditableValueGUI($this->lng->txt('log_error_folder'), 'error_folder');
419 $folder->setValue($this->getErrorSettings()->folder());
420 $form->addItem($folder);
421
422 $mail = new ilTextInputGUI($this->lng->txt('log_error_mail'), 'error_mail');
423 $mail->setValue($this->getErrorSettings()->mail());
424 $form->addItem($mail);
425
426 return $form;
427 }
This class represents a non editable value in a property form.
This class represents a text property in a property form.
mail($to, $subject, $message, $additional_headers=null, $additional_parameters=null)
global $ilDB

References $DIC, $form, $ilDB, $lng, getErrorSettings(), and Monolog\Handler\mail().

Referenced by errorSettings(), and updateErrorSettings().

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

◆ initFormSettings()

ilObjLoggingSettingsGUI::initFormSettings ( )
protected

Init settings form.

Definition at line 244 of file class.ilObjLoggingSettingsGUI.php.

245 {
246 global $DIC;
247
248 $lng = $DIC['lng'];
249 $ilDB = $DIC['ilDB'];
250 $ilAccess = $DIC['ilAccess'];
251
252 include_once './Services/Form/classes/class.ilPropertyFormGUI.php';
253 include_once './Services/Search/classes/class.ilSearchSettings.php';
254
255 $form = new ilPropertyFormGUI();
256 $form->setTitle($this->lng->txt('logs_settings'));
257 $form->setFormAction($this->ctrl->getFormAction($this));
258
259 if ($ilAccess->checkAccess('write', '', $this->object->getRefId())) {
260 $form->addCommandButton('updateSettings', $this->lng->txt('save'));
261 }
262
263 $level = new ilSelectInputGUI($this->lng->txt('log_log_level'), 'level');
264 $level->setOptions(ilLogLevel::getLevelOptions());
265 $level->setValue($this->getSettings()->getLevel());
266 $form->addItem($level);
267
268 $cache = new ilCheckboxInputGUI($this->lng->txt('log_cache_'), 'cache');
269 $cache->setInfo($this->lng->txt('log_cache_info'));
270 $cache->setValue(1);
271 $cache->setChecked($this->getSettings()->isCacheEnabled());
272 $form->addItem($cache);
273
274 $cache_level = new ilSelectInputGUI($this->lng->txt('log_cache_level'), 'cache_level');
275 $cache_level->setOptions(ilLogLevel::getLevelOptions());
276 $cache_level->setValue($this->getSettings()->getCacheLevel());
277 $cache->addSubItem($cache_level);
278
279 $memory = new ilCheckboxInputGUI($this->lng->txt('log_memory'), 'memory');
280 $memory->setValue(1);
281 $memory->setChecked($this->getSettings()->isMemoryUsageEnabled());
282 $form->addItem($memory);
283
284 // Browser handler
285 $browser = new ilCheckboxInputGUI($this->lng->txt('log_browser'), 'browser');
286 $browser->setValue(1);
287 $browser->setChecked($this->getSettings()->isBrowserLogEnabled());
288 $form->addItem($browser);
289
290 // users
291 $users = new ilTextInputGUI($this->lng->txt('log_browser_users'), 'browser_users');
292 $users->setValue(current($this->getSettings()->getBrowserLogUsers()));
293 $users->setMulti(true);
294 $users->setMultiValues($this->getSettings()->getBrowserLogUsers());
295
296 $this->getLogger()->debug(print_r($this->getSettings()->getBrowserLogUsers(), true));
297
298 $browser->addSubItem($users);
299
300
301 return $form;
302 }
$users
Definition: authpage.php:44
$browser
This class represents a checkbox property in a property form.
static getLevelOptions()
Get log level options.
This class represents a selection list property in a property form.

References $browser, $DIC, $form, $ilDB, $lng, $users, ilLogLevel\getLevelOptions(), getLogger(), and getSettings().

Referenced by settings(), and updateSettings().

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

◆ initSettings()

ilObjLoggingSettingsGUI::initSettings ( )
protected

Definition at line 155 of file class.ilObjLoggingSettingsGUI.php.

156 {
157 include_once("Services/Logging/classes/class.ilLoggingDBSettings.php");
159 }
static getInstance()
Get instance.
settings(ilPropertyFormGUI $form=null)
Show settings @access public.

References ilLoggingDBSettings\getInstance(), and settings().

Referenced by __construct().

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

◆ resetComponentLevels()

ilObjLoggingSettingsGUI::resetComponentLevels ( )
protected

Definition at line 341 of file class.ilObjLoggingSettingsGUI.php.

342 {
343 $this->checkPermission('write');
344
345 foreach (ilLogComponentLevels::getInstance()->getLogComponents() as $component) {
346 $component->setLevel(null);
347 $component->update();
348 }
349 ilUtil::sendSuccess($this->lng->txt('settings_saved'), true);
350 $this->ctrl->redirect($this, 'components');
351 }
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.

References ilObjectGUI\checkPermission(), and ilLogComponentLevels\getInstance().

+ Here is the call graph for this function:

◆ saveComponentLevels()

ilObjLoggingSettingsGUI::saveComponentLevels ( )
protected

Save form.

Definition at line 325 of file class.ilObjLoggingSettingsGUI.php.

326 {
327 $this->checkPermission('write');
328
329 foreach ($_POST['level'] as $component_id => $value) {
330 ilLoggerFactory::getLogger('log')->debug($component_id);
331 ilLoggerFactory::getLogger('log')->debug($value);
332 include_once './Services/Logging/classes/class.ilLogComponentLevel.php';
333 $level = new ilLogComponentLevel($component_id, $value);
334 $level->update();
335 }
336
337 ilUtil::sendSuccess($this->lng->txt('settings_saved'), true);
338 $this->ctrl->redirect($this, 'components');
339 }
$_POST["username"]
individual log levels for components

References $_POST, ilObjectGUI\checkPermission(), and ilLoggerFactory\getLogger().

+ Here is the call graph for this function:

◆ setSubTabs()

ilObjLoggingSettingsGUI::setSubTabs (   $a_section)

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

135 {
136 $this->tabs_gui->addSubTab(
137 static::SUB_SECTION_MAIN,
138 $this->lng->txt(static::SUB_SECTION_MAIN),
139 $this->ctrl->getLinkTarget($this, 'settings')
140 );
141 $this->tabs_gui->addSubTab(
142 static::SUB_SECTION_ERROR,
143 $this->lng->txt(static::SUB_SECTION_ERROR),
144 $this->ctrl->getLinkTarget($this, 'errorSettings')
145 );
146 $this->tabs_gui->addSubTab(
147 static::SUB_SECTION_COMPONENTS,
148 $this->lng->txt(static::SUB_SECTION_COMPONENTS),
149 $this->ctrl->getLinkTarget($this, 'components')
150 );
151
152 $this->tabs_gui->activateSubTab($a_section);
153 }

Referenced by components(), errorSettings(), and settings().

+ Here is the caller graph for this function:

◆ settings()

ilObjLoggingSettingsGUI::settings ( ilPropertyFormGUI  $form = null)

Show settings @access public.

Definition at line 174 of file class.ilObjLoggingSettingsGUI.php.

175 {
176 global $DIC;
177
178 $ilAccess = $DIC['ilAccess'];
179 $ilErr = $DIC['ilErr'];
180
181 if (!$ilAccess->checkAccess('read', '', $this->object->getRefId())) {
182 $ilErr->raiseError($this->lng->txt('permission_denied'), $ilErr->MESSAGE);
183 }
184
185 $this->tabs_gui->setTabActive(static::SECTION_SETTINGS);
186 $this->setSubTabs(static::SUB_SECTION_MAIN);
187
188 if (!$form instanceof ilPropertyFormGUI) {
189 $form = $this->initFormSettings();
190 }
191 $this->tpl->setContent($form->getHTML());
192
193 $this->getLogger()->debug('Currrent level is ' . $this->getSettings()->getLevel());
194
195 return true;
196 }

References $DIC, $form, ilObjectGUI\$ilErr, getLogger(), getSettings(), initFormSettings(), and setSubTabs().

Referenced by initSettings(), and updateSettings().

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

◆ updateErrorSettings()

ilObjLoggingSettingsGUI::updateErrorSettings ( )
protected

Definition at line 375 of file class.ilObjLoggingSettingsGUI.php.

376 {
377 global $DIC;
378
379 $rbacsystem = $DIC['rbacsystem'];
380
381 if (!$rbacsystem->checkAccess('write', $this->object->getRefId())) {
382 $this->ilias->raiseError($this->lng->txt("permission_denied"), $this->ilias->error_obj->MESSAGE);
383 }
384
385 $form = $this->initFormErrorSettings();
386 if ($form->checkInput()) {
387 $this->getErrorSettings()->setMail($form->getInput('error_mail'));
388 $this->getErrorSettings()->update();
389
390 ilUtil::sendSuccess($this->lng->txt('error_settings_saved'), true);
391 $this->ctrl->redirect($this, 'errorSettings');
392 }
393
394 ilUtil::sendFailure($this->lng->txt('err_check_input'));
395 $form->setValuesByPost();
396 $this->errorSettings($form);
397 }
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
redirection script todo: (a better solution should control the processing via a xml file)

References $DIC, $form, errorSettings(), getErrorSettings(), initFormErrorSettings(), and ilUtil\sendFailure().

+ Here is the call graph for this function:

◆ updateSettings()

ilObjLoggingSettingsGUI::updateSettings ( )

Save settings @access public.

Definition at line 202 of file class.ilObjLoggingSettingsGUI.php.

203 {
204 include_once 'Services/WebServices/RPC/classes/class.ilRPCServerSettings.php';
205
206 global $DIC;
207
208 $rbacsystem = $DIC['rbacsystem'];
209
210 if (!$rbacsystem->checkAccess('write', $this->object->getRefId())) {
211 $this->ilias->raiseError($this->lng->txt("permission_denied"), $this->ilias->error_obj->MESSAGE);
212 }
213
214
215 $form = $this->initFormSettings();
216 if ($form->checkInput()) {
217 $this->getSettings()->setLevel($form->getInput('level'));
218 $this->getSettings()->enableCaching($form->getInput('cache'));
219 $this->getSettings()->setCacheLevel($form->getInput('cache_level'));
220 $this->getSettings()->enableMemoryUsage($form->getInput('memory'));
221 $this->getSettings()->enableBrowserLog($form->getInput('browser'));
222 $this->getSettings()->setBrowserUsers($form->getInput('browser_users'));
223
224 $this->getLogger()->info(print_r($form->getInput('browser_users'), true));
225
226 $this->getSettings()->update();
227
228 ilUtil::sendSuccess($this->lng->txt('settings_saved'), true);
229 $this->ctrl->redirect($this, 'settings');
230 return true;
231 }
232
233 ilUtil::sendFailure($this->lng->txt('err_check_input'));
234 $form->setValuesByPost();
235 $this->settings($form);
236
237 return true;
238 }

References $DIC, $form, getLogger(), getSettings(), initFormSettings(), ilUtil\sendFailure(), and settings().

+ Here is the call graph for this function:

Field Documentation

◆ $ctrl

ilObjLoggingSettingsGUI::$ctrl

Definition at line 24 of file class.ilObjLoggingSettingsGUI.php.

◆ $form

ilObjLoggingSettingsGUI::$form
protected

◆ $lng

ilObjLoggingSettingsGUI::$lng

◆ $log

ilObjLoggingSettingsGUI::$log
protected

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

Referenced by getLogger().

◆ $settings

ilObjLoggingSettingsGUI::$settings
protected

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

Referenced by getSettings().

◆ $tabs_gui

ilObjLoggingSettingsGUI::$tabs_gui
protected

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

◆ $tpl

ilObjLoggingSettingsGUI::$tpl

Definition at line 22 of file class.ilObjLoggingSettingsGUI.php.

Referenced by __construct().

◆ SECTION_SETTINGS

const ilObjLoggingSettingsGUI::SECTION_SETTINGS = 'settings'

Definition at line 16 of file class.ilObjLoggingSettingsGUI.php.

◆ SUB_SECTION_COMPONENTS

const ilObjLoggingSettingsGUI::SUB_SECTION_COMPONENTS = 'log_components'

Definition at line 18 of file class.ilObjLoggingSettingsGUI.php.

◆ SUB_SECTION_ERROR

const ilObjLoggingSettingsGUI::SUB_SECTION_ERROR = 'log_error_settings'

Definition at line 19 of file class.ilObjLoggingSettingsGUI.php.

◆ SUB_SECTION_MAIN

const ilObjLoggingSettingsGUI::SUB_SECTION_MAIN = 'log_general_settings'

Definition at line 17 of file class.ilObjLoggingSettingsGUI.php.


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