ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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 public. More...
 
 updateSettings ()
 Save settings 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 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...
 

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

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

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

Constructor & Destructor Documentation

◆ __construct()

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

Constructor.

public

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

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

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

Member Function Documentation

◆ components()

ilObjLoggingSettingsGUI::components ( )
protected

Show components.

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

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

293  {
294  $this->tabs_gui->activateTab(static::SECTION_SETTINGS);
295  $this->setSubTabs(static::SUB_SECTION_COMPONENTS);
296 
297  include_once './Services/Logging/classes/class.ilLogComponentTableGUI.php';
298  $table = new ilLogComponentTableGUI($this, 'components');
299  $table->setEditable($this->checkPermissionBool('write'));
300  $table->init();
301  $table->parse();
302 
303  $GLOBALS['tpl']->setContent($table->getHTML());
304  }
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
if(empty($password)) $table
Definition: pwgen.php:24
Component logger with individual log levels by component id.
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission.
+ Here is the call graph for this function:

◆ errorSettings()

ilObjLoggingSettingsGUI::errorSettings ( )
protected

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

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

Referenced by updateErrorSettings().

338  {
339  global $ilAccess,$ilErr;
340 
341  if (!$ilAccess->checkAccess('read', '', $this->object->getRefId())) {
342  $ilErr->raiseError($this->lng->txt('permission_denied'), $ilErr->MESSAGE);
343  }
344 
345  $this->tabs_gui->setTabActive(static::SECTION_SETTINGS);
346  $this->setSubTabs(static::SUB_SECTION_ERROR);
347 
348  if (!$form instanceof ilPropertyFormGUI) {
349  $form = $this->initFormErrorSettings();
350  }
351  $this->tpl->setContent($form->getHTML());
352 
353  $this->getLogger()->debug('Currrent level is ' . $this->getSettings()->getLevel());
354  }
This class represents a property form user interface.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ executeCommand()

ilObjLoggingSettingsGUI::executeCommand ( )

Execute command.

public

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

References $ret, and ilObjectGUI\prepareOutput().

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

◆ getAdminTabs()

ilObjLoggingSettingsGUI::getAdminTabs ( )

Get tabs.

public

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

110  {
111  global $ilAccess;
112 
113  if ($ilAccess->checkAccess("read", '', $this->object->getRefId())) {
114  $this->tabs_gui->addTarget(
115  static::SECTION_SETTINGS,
116  $this->ctrl->getLinkTargetByClass('ilobjloggingsettingsgui', "settings")
117  );
118  }
119  if ($ilAccess->checkAccess('edit_permission', '', $this->object->getRefId())) {
120  $this->tabs_gui->addTarget(
121  "perm_settings",
122  $this->ctrl->getLinkTargetByClass('ilpermissiongui', "perm")
123  );
124  }
125  }

◆ getErrorSettings()

ilObjLoggingSettingsGUI::getErrorSettings ( )
protected

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

Referenced by initFormErrorSettings(), and updateErrorSettings().

411  {
412  return $this->error_settings;
413  }
+ Here is the caller graph for this function:

◆ getLogger()

ilObjLoggingSettingsGUI::getLogger ( )
Returns
ilLogger

Definition at line 66 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 158 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 404 of file class.ilObjLoggingSettingsGUI.php.

References ilLoggingErrorSettings\getInstance().

Referenced by __construct().

405  {
406  require_once("Services/Logging/classes/error/class.ilLoggingErrorSettings.php");
407  $this->error_settings = ilLoggingErrorSettings::getInstance();
408  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initFormErrorSettings()

ilObjLoggingSettingsGUI::initFormErrorSettings ( )
protected

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

References $form, $ilDB, $lng, getErrorSettings(), Monolog\Handler\mail(), ilTextInputGUI\setValue(), and ilNonEditableValueGUI\setValue().

Referenced by errorSettings(), and updateErrorSettings().

379  {
380  global $lng,$ilDB, $ilAccess;
381 
382  require_once './Services/Form/classes/class.ilPropertyFormGUI.php';
383  require_once './Services/Search/classes/class.ilSearchSettings.php';
384 
385  $form = new ilPropertyFormGUI();
386  $form->setTitle($this->lng->txt('logs_settings'));
387  $form->setFormAction($this->ctrl->getFormAction($this));
388 
389  if ($ilAccess->checkAccess('write', '', $this->object->getRefId())) {
390  $form->addCommandButton('updateErrorSettings', $this->lng->txt('save'));
391  }
392 
393  $folder = new ilNonEditableValueGUI($this->lng->txt('log_error_folder'), 'error_folder');
394  $folder->setValue($this->getErrorSettings()->folder());
395  $form->addItem($folder);
396 
397  $mail = new ilTextInputGUI($this->lng->txt('log_error_mail'), 'error_mail');
398  $mail->setValue($this->getErrorSettings()->mail());
399  $form->addItem($mail);
400 
401  return $form;
402  }
This class represents a property form user interface.
mail($to, $subject, $message, $additional_headers=null, $additional_parameters=null)
This class represents a text property in a property form.
This class represents a non editable value in a property form.
global $ilDB
setValue($a_value)
Set Value.
+ 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 232 of file class.ilObjLoggingSettingsGUI.php.

References $form, $ilDB, $lng, $users, ilLogLevel\getLevelOptions(), getLogger(), getSettings(), ilFormPropertyGUI\setInfo(), ilSelectInputGUI\setOptions(), and ilCheckboxInputGUI\setValue().

Referenced by settings(), and updateSettings().

233  {
234  global $lng,$ilDB, $ilAccess;
235 
236  include_once './Services/Form/classes/class.ilPropertyFormGUI.php';
237  include_once './Services/Search/classes/class.ilSearchSettings.php';
238 
239  $form = new ilPropertyFormGUI();
240  $form->setTitle($this->lng->txt('logs_settings'));
241  $form->setFormAction($this->ctrl->getFormAction($this));
242 
243  if ($ilAccess->checkAccess('write', '', $this->object->getRefId())) {
244  $form->addCommandButton('updateSettings', $this->lng->txt('save'));
245  }
246 
247  $level = new ilSelectInputGUI($this->lng->txt('log_log_level'), 'level');
249  $level->setValue($this->getSettings()->getLevel());
250  $form->addItem($level);
251 
252  $cache = new ilCheckboxInputGUI($this->lng->txt('log_cache_'), 'cache');
253  $cache->setInfo($this->lng->txt('log_cache_info'));
254  $cache->setValue(1);
255  $cache->setChecked($this->getSettings()->isCacheEnabled());
256  $form->addItem($cache);
257 
258  $cache_level = new ilSelectInputGUI($this->lng->txt('log_cache_level'), 'cache_level');
259  $cache_level->setOptions(ilLogLevel::getLevelOptions());
260  $cache_level->setValue($this->getSettings()->getCacheLevel());
261  $cache->addSubItem($cache_level);
262 
263  $memory = new ilCheckboxInputGUI($this->lng->txt('log_memory'), 'memory');
264  $memory->setValue(1);
265  $memory->setChecked($this->getSettings()->isMemoryUsageEnabled());
266  $form->addItem($memory);
267 
268  // Browser handler
269  $browser = new ilCheckboxInputGUI($this->lng->txt('log_browser'), 'browser');
270  $browser->setValue(1);
271  $browser->setChecked($this->getSettings()->isBrowserLogEnabled());
272  $form->addItem($browser);
273 
274  // users
275  $users = new ilTextInputGUI($this->lng->txt('log_browser_users'), 'browser_users');
276  $users->setValue(current($this->getSettings()->getBrowserLogUsers()));
277  $users->setMulti(true);
278  $users->setMultiValues($this->getSettings()->getBrowserLogUsers());
279 
280  $this->getLogger()->debug(print_r($this->getSettings()->getBrowserLogUsers(), true));
281 
282  $browser->addSubItem($users);
283 
284 
285  return $form;
286  }
This class represents a selection list property in a property form.
This class represents a property form user interface.
static getLevelOptions()
Get log level options.
This class represents a checkbox property in a property form.
setInfo($a_info)
Set Information Text.
setValue($a_value)
Set Value.
This class represents a text property in a property form.
setOptions($a_options)
Set Options.
$users
Definition: authpage.php:44
global $ilDB
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initSettings()

ilObjLoggingSettingsGUI::initSettings ( )
protected

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

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

Referenced by __construct().

149  {
150  include_once("Services/Logging/classes/class.ilLoggingDBSettings.php");
152  }
settings(ilPropertyFormGUI $form=null)
Show settings public.
static getInstance()
Get instance.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resetComponentLevels()

ilObjLoggingSettingsGUI::resetComponentLevels ( )
protected

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

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

326  {
327  $this->checkPermission('write');
328 
329  foreach (ilLogComponentLevels::getInstance()->getLogComponents() as $component) {
330  $component->setLevel(null);
331  $component->update();
332  }
333  ilUtil::sendSuccess($this->lng->txt('settings_saved'), true);
334  $this->ctrl->redirect($this, 'components');
335  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
+ Here is the call graph for this function:

◆ saveComponentLevels()

ilObjLoggingSettingsGUI::saveComponentLevels ( )
protected

Save form.

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

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

310  {
311  $this->checkPermission('write');
312 
313  foreach ($_POST['level'] as $component_id => $value) {
314  ilLoggerFactory::getLogger('log')->debug($component_id);
315  ilLoggerFactory::getLogger('log')->debug($value);
316  include_once './Services/Logging/classes/class.ilLogComponentLevel.php';
317  $level = new ilLogComponentLevel($component_id, $value);
318  $level->update();
319  }
320 
321  ilUtil::sendSuccess($this->lng->txt('settings_saved'), true);
322  $this->ctrl->redirect($this, 'components');
323  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
individual log levels for components
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
static getLogger($a_component_id)
Get component logger.
$_POST["username"]
+ Here is the call graph for this function:

◆ setSubTabs()

ilObjLoggingSettingsGUI::setSubTabs (   $a_section)

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

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

128  {
129  $this->tabs_gui->addSubTab(
130  static::SUB_SECTION_MAIN,
131  $this->lng->txt(static::SUB_SECTION_MAIN),
132  $this->ctrl->getLinkTarget($this, 'settings')
133  );
134  $this->tabs_gui->addSubTab(
135  static::SUB_SECTION_ERROR,
136  $this->lng->txt(static::SUB_SECTION_ERROR),
137  $this->ctrl->getLinkTarget($this, 'errorSettings')
138  );
139  $this->tabs_gui->addSubTab(
140  static::SUB_SECTION_COMPONENTS,
141  $this->lng->txt(static::SUB_SECTION_COMPONENTS),
142  $this->ctrl->getLinkTarget($this, 'components')
143  );
144 
145  $this->tabs_gui->activateSubTab($a_section);
146  }
+ Here is the caller graph for this function:

◆ settings()

ilObjLoggingSettingsGUI::settings ( ilPropertyFormGUI  $form = null)

Show settings public.

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

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

Referenced by initSettings(), and updateSettings().

168  {
169  global $ilAccess,$ilErr;
170 
171  if (!$ilAccess->checkAccess('read', '', $this->object->getRefId())) {
172  $ilErr->raiseError($this->lng->txt('permission_denied'), $ilErr->MESSAGE);
173  }
174 
175  $this->tabs_gui->setTabActive(static::SECTION_SETTINGS);
176  $this->setSubTabs(static::SUB_SECTION_MAIN);
177 
178  if (!$form instanceof ilPropertyFormGUI) {
179  $form = $this->initFormSettings();
180  }
181  $this->tpl->setContent($form->getHTML());
182 
183  $this->getLogger()->debug('Currrent level is ' . $this->getSettings()->getLevel());
184 
185  return true;
186  }
This class represents a property form user interface.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateErrorSettings()

ilObjLoggingSettingsGUI::updateErrorSettings ( )
protected

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

References $form, ilObjectGUI\$rbacsystem, errorSettings(), getErrorSettings(), initFormErrorSettings(), ilUtil\sendFailure(), and ilUtil\sendSuccess().

357  {
358  global $rbacsystem;
359 
360  if (!$rbacsystem->checkAccess('write', $this->object->getRefId())) {
361  $this->ilias->raiseError($this->lng->txt("permission_denied"), $this->ilias->error_obj->MESSAGE);
362  }
363 
364  $form = $this->initFormErrorSettings();
365  if ($form->checkInput()) {
366  $this->getErrorSettings()->setMail($form->getInput('error_mail'));
367  $this->getErrorSettings()->update();
368 
369  ilUtil::sendSuccess($this->lng->txt('error_settings_saved'), true);
370  $this->ctrl->redirect($this, 'errorSettings');
371  }
372 
373  ilUtil::sendFailure($this->lng->txt('err_check_input'));
374  $form->setValuesByPost();
375  $this->errorSettings($form);
376  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
redirection script todo: (a better solution should control the processing via a xml file) ...
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
+ Here is the call graph for this function:

◆ updateSettings()

ilObjLoggingSettingsGUI::updateSettings ( )

Save settings public.

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

References $form, ilObjectGUI\$rbacsystem, getLogger(), getSettings(), initFormSettings(), ilUtil\sendFailure(), ilUtil\sendSuccess(), and settings().

193  {
194  include_once 'Services/WebServices/RPC/classes/class.ilRPCServerSettings.php';
195 
196  global $rbacsystem;
197 
198  if (!$rbacsystem->checkAccess('write', $this->object->getRefId())) {
199  $this->ilias->raiseError($this->lng->txt("permission_denied"), $this->ilias->error_obj->MESSAGE);
200  }
201 
202 
203  $form = $this->initFormSettings();
204  if ($form->checkInput()) {
205  $this->getSettings()->setLevel($form->getInput('level'));
206  $this->getSettings()->enableCaching($form->getInput('cache'));
207  $this->getSettings()->setCacheLevel($form->getInput('cache_level'));
208  $this->getSettings()->enableMemoryUsage($form->getInput('memory'));
209  $this->getSettings()->enableBrowserLog($form->getInput('browser'));
210  $this->getSettings()->setBrowserUsers($form->getInput('browser_users'));
211 
212  $this->getLogger()->info(print_r($form->getInput('browser_users'), true));
213 
214  $this->getSettings()->update();
215 
216  ilUtil::sendSuccess($this->lng->txt('settings_saved'), true);
217  $this->ctrl->redirect($this, 'settings');
218  return true;
219  }
220 
221  ilUtil::sendFailure($this->lng->txt('err_check_input'));
222  $form->setValuesByPost();
223  $this->settings($form);
224 
225  return true;
226  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
redirection script todo: (a better solution should control the processing via a xml file) ...
settings(ilPropertyFormGUI $form=null)
Show settings public.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
+ 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: