ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
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 ()
 viewObject container presentation for "administration -> repository, trash, permissions" 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...
 
 addToDeskObject ()
 @inheritDoc More...
 
 removeFromDeskObject ()
 @inheritDoc 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...
 
 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

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

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 43 of file class.ilObjLoggingSettingsGUI.php.

44 {
45 global $DIC;
46
47 $this->type = 'logs';
48 parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
49
50 $this->dic = $DIC;
51 $this->lng = $this->dic->language();
52
53 $this->tpl = $this->dic['tpl'];
54 $this->lng = $this->dic->language();
55 $this->ctrl = $this->dic->ctrl();
56 $this->tabs_gui = $this->dic->tabs();
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.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
$DIC
Definition: xapitoken.php:46

References $DIC, ILIAS\GlobalScreen\Provider\__construct(), 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 305 of file class.ilObjLoggingSettingsGUI.php.

306 {
307 $this->tabs_gui->activateTab(static::SECTION_SETTINGS);
308 $this->setSubTabs(static::SUB_SECTION_COMPONENTS);
309
310 include_once './Services/Logging/classes/class.ilLogComponentTableGUI.php';
311 $table = new ilLogComponentTableGUI($this, 'components');
312 $table->setEditable($this->checkPermissionBool('write'));
313 $table->init();
314 $table->parse();
315
316 $GLOBALS['DIC']['tpl']->setContent($table->getHTML());
317 }
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64
Component logger with individual log levels by component id.
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission.

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

+ Here is the call graph for this function:

◆ errorSettings()

ilObjLoggingSettingsGUI::errorSettings ( )
protected

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

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

References $DIC, $form, ILIAS\GlobalScreen\Scope\MainMenu\Collector\Renderer\getLevel(), 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 429 of file class.ilObjLoggingSettingsGUI.php.

430 {
431 return $this->error_settings;
432 }

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 423 of file class.ilObjLoggingSettingsGUI.php.

424 {
425 require_once("Services/Logging/classes/error/class.ilLoggingErrorSettings.php");
426 $this->error_settings = ilLoggingErrorSettings::getInstance();
427 }

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 393 of file class.ilObjLoggingSettingsGUI.php.

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

References $DIC, $form, $ilDB, $lng, and getErrorSettings().

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 241 of file class.ilObjLoggingSettingsGUI.php.

242 {
243 global $DIC;
244
245 $lng = $DIC['lng'];
246 $ilDB = $DIC['ilDB'];
247 $ilAccess = $DIC['ilAccess'];
248
249 include_once './Services/Form/classes/class.ilPropertyFormGUI.php';
250 include_once './Services/Search/classes/class.ilSearchSettings.php';
251
252 $form = new ilPropertyFormGUI();
253 $form->setTitle($this->lng->txt('logs_settings'));
254 $form->setFormAction($this->ctrl->getFormAction($this));
255
256 if ($ilAccess->checkAccess('write', '', $this->object->getRefId())) {
257 $form->addCommandButton('updateSettings', $this->lng->txt('save'));
258 }
259
260 $level = new ilSelectInputGUI($this->lng->txt('log_log_level'), 'level');
261 $level->setOptions(ilLogLevel::getLevelOptions());
262 $level->setValue($this->getSettings()->getLevel());
263 $form->addItem($level);
264
265 $cache = new ilCheckboxInputGUI($this->lng->txt('log_cache_'), 'cache');
266 $cache->setInfo($this->lng->txt('log_cache_info'));
267 $cache->setValue(1);
268 $cache->setChecked($this->getSettings()->isCacheEnabled());
269 $form->addItem($cache);
270
271 $cache_level = new ilSelectInputGUI($this->lng->txt('log_cache_level'), 'cache_level');
272 $cache_level->setOptions(ilLogLevel::getLevelOptions());
273 $cache_level->setValue($this->getSettings()->getCacheLevel());
274 $cache->addSubItem($cache_level);
275
276 $memory = new ilCheckboxInputGUI($this->lng->txt('log_memory'), 'memory');
277 $memory->setValue(1);
278 $memory->setChecked($this->getSettings()->isMemoryUsageEnabled());
279 $form->addItem($memory);
280
281 // Browser handler
282 $browser = new ilCheckboxInputGUI($this->lng->txt('log_browser'), 'browser');
283 $browser->setValue(1);
284 $browser->setChecked($this->getSettings()->isBrowserLogEnabled());
285 $form->addItem($browser);
286
287 // users
288 $users = new ilTextInputGUI($this->lng->txt('log_browser_users'), 'browser_users');
289 $users->setValue(current($this->getSettings()->getBrowserLogUsers()));
290 $users->setMulti(true);
291 $users->setMultiValues($this->getSettings()->getBrowserLogUsers());
292
293 $this->getLogger()->debug(print_r($this->getSettings()->getBrowserLogUsers(), true));
294
295 $browser->addSubItem($users);
296
297
298 return $form;
299 }
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 $DIC, $form, $ilDB, $lng, ILIAS\GlobalScreen\Scope\MainMenu\Collector\Renderer\getLevel(), 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 338 of file class.ilObjLoggingSettingsGUI.php.

339 {
340 $this->checkPermission('write');
341
342 foreach (ilLogComponentLevels::getInstance()->getLogComponents() as $component) {
343 $component->setLevel(null);
344 $component->update();
345 }
346 ilUtil::sendSuccess($this->lng->txt('settings_saved'), true);
347 $this->ctrl->redirect($this, 'components');
348 }
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 322 of file class.ilObjLoggingSettingsGUI.php.

323 {
324 $this->checkPermission('write');
325
326 foreach ($_POST['level'] as $component_id => $value) {
327 ilLoggerFactory::getLogger('log')->debug($component_id);
328 ilLoggerFactory::getLogger('log')->debug($value);
329 include_once './Services/Logging/classes/class.ilLogComponentLevel.php';
330 $level = new ilLogComponentLevel($component_id, $value);
331 $level->update();
332 }
333
334 ilUtil::sendSuccess($this->lng->txt('settings_saved'), true);
335 $this->ctrl->redirect($this, 'components');
336 }
$_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 if (!$this->rbacsystem->checkAccess("visible,read", $this->object->getRefId())) {
179 $DIC['ilErr']->raiseError($this->lng->txt('permission_denied'), $DIC['ilErr']->MESSAGE);
180 }
181
182 $this->tabs_gui->setTabActive(static::SECTION_SETTINGS);
183 $this->setSubTabs(static::SUB_SECTION_MAIN);
184
185 if (!$form instanceof ilPropertyFormGUI) {
186 $form = $this->initFormSettings();
187 }
188 $this->tpl->setContent($form->getHTML());
189
190 $this->getLogger()->debug('Currrent level is ' . $this->getSettings()->getLevel());
191
192 return true;
193 }

References $DIC, $form, ILIAS\GlobalScreen\Scope\MainMenu\Collector\Renderer\getLevel(), 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 369 of file class.ilObjLoggingSettingsGUI.php.

370 {
371 global $DIC;
372
373 $rbacsystem = $DIC['rbacsystem'];
374
375 if (!$rbacsystem->checkAccess('write', $this->object->getRefId())) {
376 $this->ilias->raiseError($this->lng->txt("permission_denied"), $this->ilias->error_obj->MESSAGE);
377 }
378
379 $form = $this->initFormErrorSettings();
380 if ($form->checkInput()) {
381 $this->getErrorSettings()->setMail($form->getInput('error_mail'));
382 $this->getErrorSettings()->update();
383
384 ilUtil::sendSuccess($this->lng->txt('error_settings_saved'), true);
385 $this->ctrl->redirect($this, 'errorSettings');
386 }
387
388 ilUtil::sendFailure($this->lng->txt('err_check_input'));
389 $form->setValuesByPost();
390 $this->errorSettings($form);
391 }
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, ilObjectGUI\$rbacsystem, errorSettings(), getErrorSettings(), initFormErrorSettings(), and ilUtil\sendFailure().

+ Here is the call graph for this function:

◆ updateSettings()

ilObjLoggingSettingsGUI::updateSettings ( )

Save settings @access public.

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

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

References $DIC, $form, ilObjectGUI\$rbacsystem, 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.

◆ $dic

ilObjLoggingSettingsGUI::$dic
protected

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

◆ $form

ilObjLoggingSettingsGUI::$form
protected

◆ $lng

ilObjLoggingSettingsGUI::$lng

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

Referenced by initFormErrorSettings(), and initFormSettings().

◆ $log

ilObjLoggingSettingsGUI::$log
protected

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

Referenced by getLogger().

◆ $settings

ilObjLoggingSettingsGUI::$settings
protected

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

Referenced by getSettings().

◆ $tabs_gui

ilObjLoggingSettingsGUI::$tabs_gui
protected

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

◆ $tpl

ilObjLoggingSettingsGUI::$tpl

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

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