ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilObjLoggingSettingsGUI Class Reference
+ Inheritance diagram for ilObjLoggingSettingsGUI:
+ Collaboration diagram for ilObjLoggingSettingsGUI:

Public Member Functions

 __construct ($a_data, int $a_id, bool $a_call_by_reference, bool $a_prepare_output=true)
 
 getLogger ()
 
 executeCommand ()
 
 getAdminTabs ()
 
 setSubTabs (string $a_section)
 
 getSettings ()
 
 settings (ilPropertyFormGUI $form=null)
 
 updateSettings ()
 
- 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 Member Functions

 initSettings ()
 
 initFormSettings ()
 
 components ()
 Show components. More...
 
 saveComponentLevels ()
 Save form. More...
 
 resetComponentLevels ()
 
 errorSettings (?ilPropertyFormGUI $form=null)
 
 updateErrorSettings ()
 
 initFormErrorSettings ()
 
 initErrorSettings ()
 
 getErrorSettings ()
 
- 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...
 

Protected Attributes

const SECTION_SETTINGS = 'settings'
 
const SUB_SECTION_MAIN = 'log_general_settings'
 
const SUB_SECTION_COMPONENTS = 'log_components'
 
const SUB_SECTION_ERROR = 'log_error_settings'
 
ilLoggingDBSettings $log_settings
 
ilLogger $log
 
ilLoggingErrorSettings $error_settings
 
Refinery $refinery
 
Services $http
 
- 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 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 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
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilObjLoggingSettingsGUI::__construct (   $a_data,
int  $a_id,
bool  $a_call_by_reference,
bool  $a_prepare_output = true 
)
Parameters
mixed$a_data
boolean$a_prepare_output

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

References $DIC, ILIAS\GlobalScreen\Provider\__construct(), ilLoggerFactory\getLogger(), ILIAS\FileDelivery\http(), initErrorSettings(), initSettings(), ILIAS\Repository\lng(), and ILIAS\Repository\refinery().

37  {
38  global $DIC;
39 
40  $this->type = 'logs';
41  parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
42 
43  $this->lng = $DIC->language();
44 
45  $this->initSettings();
46  $this->initErrorSettings();
47  $this->lng->loadLanguageModule('logging');
48  $this->lng->loadLanguageModule('log');
49  $this->log = ilLoggerFactory::getLogger('log');
50 
51  $this->http = $DIC->http();
52  $this->refinery = $DIC->refinery();
53  }
static getLogger(string $a_component_id)
Get component logger.
global $DIC
Definition: feed.php:28
static http()
Fetches the global http state from ILIAS.
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ components()

ilObjLoggingSettingsGUI::components ( )
protected

Show components.

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

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

226  : void
227  {
228  $this->tabs_gui->activateTab(static::SECTION_SETTINGS);
229  $this->setSubTabs(static::SUB_SECTION_COMPONENTS);
230 
231  $table = new ilLogComponentTableGUI($this, 'components');
232  $table->setEditable($this->checkPermissionBool('write'));
233  $table->init();
234  $table->parse();
235  $this->tpl->setContent($table->getHTML());
236  }
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
Component logger with individual log levels by component id.
+ Here is the call graph for this function:

◆ errorSettings()

ilObjLoggingSettingsGUI::errorSettings ( ?ilPropertyFormGUI  $form = null)
protected

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

References ilObjectGUI\checkPermission(), initFormErrorSettings(), and setSubTabs().

Referenced by updateErrorSettings().

286  : void
287  {
288  $this->checkPermission('read');
289  $this->tabs_gui->setTabActive(static::SECTION_SETTINGS);
290  $this->setSubTabs(static::SUB_SECTION_ERROR);
291 
292  if (!$form instanceof ilPropertyFormGUI) {
293  $form = $this->initFormErrorSettings();
294  }
295  $this->tpl->setContent($form->getHTML());
296  }
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ executeCommand()

ilObjLoggingSettingsGUI::executeCommand ( )

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

References ILIAS\Repository\ctrl(), and ilObjectGUI\prepareOutput().

60  : void
61  {
62  $next_class = $this->ctrl->getNextClass($this);
63  $cmd = $this->ctrl->getCmd();
64  $this->prepareOutput();
65 
66  switch ($next_class) {
67  case 'ilpermissiongui':
68  $this->tabs_gui->setTabActive('perm_settings');
69  $perm_gui = new ilPermissionGUI($this);
70  $this->ctrl->forwardCommand($perm_gui);
71  break;
72 
73  default:
74  if ($cmd == "" || $cmd == "view") {
75  $cmd = "settings";
76  }
77  $this->$cmd();
78 
79  break;
80  }
81  }
prepareOutput(bool $show_sub_objects=true)
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
+ Here is the call graph for this function:

◆ getAdminTabs()

ilObjLoggingSettingsGUI::getAdminTabs ( )

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

References ILIAS\Repository\access(), and ILIAS\Repository\ctrl().

84  : void
85  {
86  if ($this->access->checkAccess("read", '', $this->object->getRefId())) {
87  $this->tabs_gui->addTarget(
88  static::SECTION_SETTINGS,
89  $this->ctrl->getLinkTargetByClass('ilobjloggingsettingsgui', "settings")
90  );
91  }
92  if ($this->access->checkAccess('edit_permission', '', $this->object->getRefId())) {
93  $this->tabs_gui->addTarget(
94  "perm_settings",
95  $this->ctrl->getLinkTargetByClass('ilpermissiongui', "perm")
96  );
97  }
98  }
+ Here is the call graph for this function:

◆ getErrorSettings()

ilObjLoggingSettingsGUI::getErrorSettings ( )
protected

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

References $error_settings.

Referenced by initFormErrorSettings(), and updateErrorSettings().

340  {
341  return $this->error_settings;
342  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilLoggingErrorSettings $error_settings
+ Here is the caller graph for this function:

◆ getLogger()

ilObjLoggingSettingsGUI::getLogger ( )

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

References $log.

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

55  : ilLogger
56  {
57  return $this->log;
58  }
+ Here is the caller graph for this function:

◆ getSettings()

ilObjLoggingSettingsGUI::getSettings ( )

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

References $log_settings.

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

+ Here is the caller graph for this function:

◆ initErrorSettings()

ilObjLoggingSettingsGUI::initErrorSettings ( )
protected

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

References ilLoggingErrorSettings\getInstance().

Referenced by __construct().

334  : void
335  {
336  $this->error_settings = ilLoggingErrorSettings::getInstance();
337  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initFormErrorSettings()

ilObjLoggingSettingsGUI::initFormErrorSettings ( )
protected

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

References ILIAS\Repository\access(), ILIAS\Repository\ctrl(), getErrorSettings(), ILIAS\Repository\lng(), and ilNonEditableValueGUI\setValue().

Referenced by errorSettings(), and updateErrorSettings().

315  {
316  $form = new ilPropertyFormGUI();
317  $form->setTitle($this->lng->txt('logs_settings'));
318  $form->setFormAction($this->ctrl->getFormAction($this));
319 
320  if ($this->access->checkAccess('write', '', $this->object->getRefId())) {
321  $form->addCommandButton('updateErrorSettings', $this->lng->txt('save'));
322  }
323 
324  $folder = new ilNonEditableValueGUI($this->lng->txt('log_error_folder'), 'error_folder');
325  $folder->setValue($this->getErrorSettings()->folder());
326  $form->addItem($folder);
327 
328  $mail = new ilTextInputGUI($this->lng->txt('log_error_mail'), 'error_mail');
329  $mail->setValue($this->getErrorSettings()->mail());
330  $form->addItem($mail);
331  return $form;
332  }
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:
+ Here is the caller graph for this function:

◆ initFormSettings()

ilObjLoggingSettingsGUI::initFormSettings ( )
protected

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

References ILIAS\Repository\access(), ILIAS\Repository\ctrl(), ilLogLevel\getLevelOptions(), getLogger(), getSettings(), ILIAS\Repository\lng(), ilFormPropertyGUI\setInfo(), and ilCheckboxInputGUI\setValue().

Referenced by settings(), and updateSettings().

176  {
177  $form = new ilPropertyFormGUI();
178  $form->setTitle($this->lng->txt('logs_settings'));
179  $form->setFormAction($this->ctrl->getFormAction($this));
180 
181  if ($this->access->checkAccess('write', '', $this->object->getRefId())) {
182  $form->addCommandButton('updateSettings', $this->lng->txt('save'));
183  }
184 
185  $level = new ilSelectInputGUI($this->lng->txt('log_log_level'), 'level');
186  $level->setOptions(ilLogLevel::getLevelOptions());
187  $level->setValue($this->getSettings()->getLevel());
188  $form->addItem($level);
189 
190  $cache = new ilCheckboxInputGUI($this->lng->txt('log_cache_'), 'cache');
191  $cache->setInfo($this->lng->txt('log_cache_info'));
192  $cache->setValue('1');
193  $cache->setChecked($this->getSettings()->isCacheEnabled());
194  $form->addItem($cache);
195 
196  $cache_level = new ilSelectInputGUI($this->lng->txt('log_cache_level'), 'cache_level');
197  $cache_level->setOptions(ilLogLevel::getLevelOptions());
198  $cache_level->setValue($this->getSettings()->getCacheLevel());
199  $cache->addSubItem($cache_level);
200 
201  $memory = new ilCheckboxInputGUI($this->lng->txt('log_memory'), 'memory');
202  $memory->setValue('1');
203  $memory->setChecked($this->getSettings()->isMemoryUsageEnabled());
204  $form->addItem($memory);
205 
206  // Browser handler
207  $browser = new ilCheckboxInputGUI($this->lng->txt('log_browser'), 'browser');
208  $browser->setValue('1');
209  $browser->setChecked($this->getSettings()->isBrowserLogEnabled());
210  $form->addItem($browser);
211 
212  // users
213  $users = new ilTextInputGUI($this->lng->txt('log_browser_users'), 'browser_users');
214  $users->setValue(current($this->getSettings()->getBrowserLogUsers()));
215  $users->setMulti(true);
216  $users->setMultiValues($this->getSettings()->getBrowserLogUsers());
217  $this->getLogger()->debug(print_r($this->getSettings()->getBrowserLogUsers(), true));
218  $browser->addSubItem($users);
219  return $form;
220  }
static getLevelOptions()
This class represents a checkbox property in a property form.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initSettings()

ilObjLoggingSettingsGUI::initSettings ( )
protected

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

References ilLoggingDBSettings\getInstance().

Referenced by __construct().

121  {
122  $this->log_settings = ilLoggingDBSettings::getInstance();
123  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resetComponentLevels()

ilObjLoggingSettingsGUI::resetComponentLevels ( )
protected

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

References ilObjectGUI\checkPermission(), ILIAS\Repository\ctrl(), ilLogComponentLevels\getInstance(), and ILIAS\Repository\lng().

275  : void
276  {
277  $this->checkPermission('write');
278  foreach (ilLogComponentLevels::getInstance()->getLogComponents() as $component) {
279  $component->setLevel(null);
280  $component->update();
281  }
282  $this->tpl->setOnScreenMessage('success', $this->lng->txt('settings_saved'), true);
283  $this->ctrl->redirect($this, 'components');
284  }
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ saveComponentLevels()

ilObjLoggingSettingsGUI::saveComponentLevels ( )
protected

Save form.

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

References ilObjectGUI\checkPermission(), ILIAS\Repository\ctrl(), ILIAS\FileDelivery\http(), ILIAS\Repository\int(), ILIAS\Repository\lng(), and ILIAS\Repository\refinery().

241  : void
242  {
243  $this->checkPermission('write');
244 
245  $levels = [];
246  if ($this->http->wrapper()->post()->has('level')) {
247  $levels = $this->http->wrapper()->post()->retrieve(
248  'level',
249  $this->refinery->custom()->transformation(
250  function ($arr) {
251  // keep keys(!), transform all values to int
252  return array_column(
253  array_map(
254  static function ($k, $v): array {
255  return [$k, (int) $v];
256  },
257  array_keys($arr),
258  $arr
259  ),
260  1,
261  0
262  );
263  }
264  )
265  );
266  }
267  foreach ($levels as $component_id => $value) {
268  $level = new ilLogComponentLevel($component_id, $value);
269  $level->update();
270  }
271  $this->tpl->setOnScreenMessage('success', $this->lng->txt('settings_saved'), true);
272  $this->ctrl->redirect($this, 'components');
273  }
static http()
Fetches the global http state from ILIAS.
individual log levels for components
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ setSubTabs()

ilObjLoggingSettingsGUI::setSubTabs ( string  $a_section)

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

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

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

100  : void
101  {
102  $this->tabs_gui->addSubTab(
103  static::SUB_SECTION_MAIN,
104  $this->lng->txt(static::SUB_SECTION_MAIN),
105  $this->ctrl->getLinkTarget($this, 'settings')
106  );
107  $this->tabs_gui->addSubTab(
108  static::SUB_SECTION_ERROR,
109  $this->lng->txt(static::SUB_SECTION_ERROR),
110  $this->ctrl->getLinkTarget($this, 'errorSettings')
111  );
112  $this->tabs_gui->addSubTab(
113  static::SUB_SECTION_COMPONENTS,
114  $this->lng->txt(static::SUB_SECTION_COMPONENTS),
115  $this->ctrl->getLinkTarget($this, 'components')
116  );
117  $this->tabs_gui->activateSubTab($a_section);
118  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ settings()

ilObjLoggingSettingsGUI::settings ( ilPropertyFormGUI  $form = null)

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

References getLogger(), getSettings(), initFormSettings(), ILIAS\Repository\lng(), and setSubTabs().

Referenced by updateSettings().

131  {
132  if (!$this->rbac_system->checkAccess("visible,read", $this->object->getRefId())) {
133  $this->error->raiseError($this->lng->txt('permission_denied'), $this->error->MESSAGE);
134  }
135 
136  $this->tabs_gui->setTabActive(static::SECTION_SETTINGS);
137  $this->setSubTabs(static::SUB_SECTION_MAIN);
138 
139  if (!$form instanceof ilPropertyFormGUI) {
140  $form = $this->initFormSettings();
141  }
142  $this->tpl->setContent($form->getHTML());
143  $this->getLogger()->debug('Currrent level is ' . $this->getSettings()->getLevel());
144  return true;
145  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateErrorSettings()

ilObjLoggingSettingsGUI::updateErrorSettings ( )
protected

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

References ilObjectGUI\checkPermission(), ILIAS\Repository\ctrl(), errorSettings(), getErrorSettings(), initFormErrorSettings(), and ILIAS\Repository\lng().

298  : void
299  {
300  $this->checkPermission('write');
301  $form = $this->initFormErrorSettings();
302  if ($form->checkInput()) {
303  $this->getErrorSettings()->setMail($form->getInput('error_mail'));
304  $this->getErrorSettings()->update();
305 
306  $this->tpl->setOnScreenMessage('success', $this->lng->txt('error_settings_saved'), true);
307  $this->ctrl->redirect($this, 'errorSettings');
308  }
309  $this->tpl->setOnScreenMessage('failure', $this->lng->txt('err_check_input'));
310  $form->setValuesByPost();
311  $this->errorSettings($form);
312  }
errorSettings(?ilPropertyFormGUI $form=null)
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ updateSettings()

ilObjLoggingSettingsGUI::updateSettings ( )

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

References ILIAS\Repository\ctrl(), getLogger(), getSettings(), initFormSettings(), ILIAS\Repository\lng(), and settings().

147  : void
148  {
149  if (!$this->rbac_system->checkAccess('write', $this->object->getRefId())) {
150  $this->ilias->raiseError($this->lng->txt("permission_denied"), $this->ilias->error_obj->MESSAGE);
151  }
152  $form = $this->initFormSettings();
153  if ($form->checkInput()) {
154  $this->getSettings()->setLevel((int) $form->getInput('level'));
155  $this->getSettings()->enableCaching((bool) $form->getInput('cache'));
156  $this->getSettings()->setCacheLevel((int) $form->getInput('cache_level'));
157  $this->getSettings()->enableMemoryUsage((bool) $form->getInput('memory'));
158  $this->getSettings()->enableBrowserLog((bool) $form->getInput('browser'));
159  $this->getSettings()->setBrowserUsers($form->getInput('browser_users'));
160 
161  $this->getLogger()->info(print_r($form->getInput('browser_users'), true));
162 
163  $this->getSettings()->update();
164 
165  $this->tpl->setOnScreenMessage('success', $this->lng->txt('settings_saved'), true);
166  $this->ctrl->redirect($this, 'settings');
167  return;
168  }
169 
170  $this->tpl->setOnScreenMessage('failure', $this->lng->txt('err_check_input'));
171  $form->setValuesByPost();
172  $this->settings($form);
173  }
header include for all ilias files.
settings(ilPropertyFormGUI $form=null)
+ Here is the call graph for this function:

Field Documentation

◆ $error_settings

ilLoggingErrorSettings ilObjLoggingSettingsGUI::$error_settings
protected

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

Referenced by getErrorSettings().

◆ $http

Services ilObjLoggingSettingsGUI::$http
protected

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

◆ $log

ilLogger ilObjLoggingSettingsGUI::$log
protected

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

Referenced by getLogger().

◆ $log_settings

ilLoggingDBSettings ilObjLoggingSettingsGUI::$log_settings
protected

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

Referenced by getSettings().

◆ $refinery

Refinery ilObjLoggingSettingsGUI::$refinery
protected

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

◆ SECTION_SETTINGS

const ilObjLoggingSettingsGUI::SECTION_SETTINGS = 'settings'
protected

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

◆ SUB_SECTION_COMPONENTS

const ilObjLoggingSettingsGUI::SUB_SECTION_COMPONENTS = 'log_components'
protected

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

◆ SUB_SECTION_ERROR

const ilObjLoggingSettingsGUI::SUB_SECTION_ERROR = 'log_error_settings'
protected

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

◆ SUB_SECTION_MAIN

const ilObjLoggingSettingsGUI::SUB_SECTION_MAIN = 'log_general_settings'
protected

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


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