ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
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
 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] does belong to the parent 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...
 
 cancelObject ()
 cancel action and go back to previous page More...
 
 createObject ()
 create new object form More...
 
 editAvailabilityPeriodObject ()
 
 saveAvailabilityPeriodObject ()
 
 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)
 
 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 ()
 
 createActionDispatcherGUI ()
 
 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...
 
 getCreationFormsHTML (StandardForm|ilPropertyFormGUI|array $form)
 
 getTitleForCreationFormPage ()
 
 getCreationFormTitle ()
 
 initCreateForm (string $new_type)
 
 didacticTemplatesToForm ()
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 
 retrieveAdditionalDidacticTemplateOptions ()
 
 addAdoptContentLinkToToolbar ()
 
 addImportButtonToToolbar ()
 
 addAvailabilityPeriodButtonToToolbar (ilToolbarGUI $toolbar)
 
 parseDidacticTemplateVar (string $var, string $type)
 
 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...
 
 routeImportCmdObject ()
 
 importFile (string $file_to_import, string $path_to_uploaded_file_in_temp_dir)
 
 deleteUploadedImportFile (string $path_to_uploaded_file_in_temp_dir)
 
 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...
 
 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...
 
 getCreatableObjectTypes ()
 
 buildAddNewItemElements (array $subtypes, string $create_target_class=ilRepositoryGUI::class, ?int $redirect_target_ref_id=null,)
 
 buildGroup (string $create_target_class, array $obj_types_in_group, string $title, array $subtypes)
 

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
 
- Protected Attributes inherited from ilObjectGUI
ILIAS Notes Service $notes_service
 
GlobalHttpState $http
 
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
 
Refinery $refinery
 
ilFavouritesManager $favourites
 
CustomIconFactory $custom_icon_factory
 
UIFactory $ui_factory
 
UIRenderer $ui_renderer
 
Filesystem $temp_file_system
 
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 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
 
const SUPPORTED_IMPORT_MIME_TYPES = [MimeType::APPLICATION__ZIP, MimeType::APPLICATION__X_ZIP_COMPRESSED]
 

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

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

50  {
51  global $DIC;
52 
53  $this->type = 'logs';
54  parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
55 
56  $this->lng = $DIC->language();
57 
58  $this->initSettings();
59  $this->initErrorSettings();
60  $this->lng->loadLanguageModule('logging');
61  $this->lng->loadLanguageModule('log');
62  $this->log = ilLoggerFactory::getLogger('log');
63 
64  $this->refinery = $DIC->refinery();
65  }
static getLogger(string $a_component_id)
Get component logger.
global $DIC
Definition: shib_login.php:26
__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 238 of file class.ilObjLoggingSettingsGUI.php.

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

238  : void
239  {
240  $this->tabs_gui->activateTab(static::SECTION_SETTINGS);
241  $this->setSubTabs(static::SUB_SECTION_COMPONENTS);
242 
243  $table = new ilLogComponentTableGUI($this, 'components');
244  $table->setEditable($this->checkPermissionBool('write'));
245  $table->init();
246  $table->parse();
247  $this->tpl->setContent($table->getHTML());
248  }
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 298 of file class.ilObjLoggingSettingsGUI.php.

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

Referenced by updateErrorSettings().

298  : void
299  {
300  $this->checkPermission('read');
301  $this->tabs_gui->setTabActive(static::SECTION_SETTINGS);
302  $this->setSubTabs(static::SUB_SECTION_ERROR);
303 
304  if (!$form instanceof ilPropertyFormGUI) {
305  $form = $this->initFormErrorSettings();
306  }
307  $this->tpl->setContent($form->getHTML());
308  }
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 72 of file class.ilObjLoggingSettingsGUI.php.

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

72  : void
73  {
74  $next_class = $this->ctrl->getNextClass($this);
75  $cmd = $this->ctrl->getCmd();
76  $this->prepareOutput();
77 
78  switch ($next_class) {
79  case 'ilpermissiongui':
80  $this->tabs_gui->setTabActive('perm_settings');
81  $perm_gui = new ilPermissionGUI($this);
82  $this->ctrl->forwardCommand($perm_gui);
83  break;
84 
85  default:
86  if ($cmd == "" || $cmd == "view") {
87  $cmd = "settings";
88  }
89  $this->$cmd();
90 
91  break;
92  }
93  }
prepareOutput(bool $show_sub_objects=true)
+ Here is the call graph for this function:

◆ getAdminTabs()

ilObjLoggingSettingsGUI::getAdminTabs ( )

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

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

96  : void
97  {
98  if ($this->access->checkAccess("read", '', $this->object->getRefId())) {
99  $this->tabs_gui->addTarget(
100  static::SECTION_SETTINGS,
101  $this->ctrl->getLinkTargetByClass('ilobjloggingsettingsgui', "settings")
102  );
103  }
104  if ($this->access->checkAccess('edit_permission', '', $this->object->getRefId())) {
105  $this->tabs_gui->addTarget(
106  "perm_settings",
107  $this->ctrl->getLinkTargetByClass('ilpermissiongui', "perm")
108  );
109  }
110  }
+ Here is the call graph for this function:

◆ getErrorSettings()

ilObjLoggingSettingsGUI::getErrorSettings ( )
protected

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

References $error_settings.

Referenced by initFormErrorSettings(), and updateErrorSettings().

352  {
353  return $this->error_settings;
354  }
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 67 of file class.ilObjLoggingSettingsGUI.php.

References $log.

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

67  : ilLogger
68  {
69  return $this->log;
70  }
+ Here is the caller graph for this function:

◆ getSettings()

ilObjLoggingSettingsGUI::getSettings ( )

Definition at line 137 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 346 of file class.ilObjLoggingSettingsGUI.php.

References ilLoggingErrorSettings\getInstance().

Referenced by __construct().

346  : void
347  {
348  $this->error_settings = ilLoggingErrorSettings::getInstance();
349  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initFormErrorSettings()

ilObjLoggingSettingsGUI::initFormErrorSettings ( )
protected

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

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

Referenced by errorSettings(), and updateErrorSettings().

327  {
328  $form = new ilPropertyFormGUI();
329  $form->setTitle($this->lng->txt('logs_settings'));
330  $form->setFormAction($this->ctrl->getFormAction($this));
331 
332  if ($this->access->checkAccess('write', '', $this->object->getRefId())) {
333  $form->addCommandButton('updateErrorSettings', $this->lng->txt('save'));
334  }
335 
336  $folder = new ilNonEditableValueGUI($this->lng->txt('log_error_folder'), 'error_folder');
337  $folder->setValue($this->getErrorSettings()->folder());
338  $form->addItem($folder);
339 
340  $mail = new ilTextInputGUI($this->lng->txt('log_error_mail'), 'error_mail');
341  $mail->setValue($this->getErrorSettings()->mail());
342  $form->addItem($mail);
343  return $form;
344  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initFormSettings()

ilObjLoggingSettingsGUI::initFormSettings ( )
protected

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

References ILIAS\Repository\access(), ILIAS\Repository\ctrl(), ilLogLevel\getLevelOptions(), getLogger(), getSettings(), ILIAS\Repository\lng(), and ilSelectInputGUI\setOptions().

Referenced by settings(), and updateSettings().

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

◆ initSettings()

ilObjLoggingSettingsGUI::initSettings ( )
protected

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

References ilLoggingDBSettings\getInstance().

Referenced by __construct().

133  {
134  $this->log_settings = ilLoggingDBSettings::getInstance();
135  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resetComponentLevels()

ilObjLoggingSettingsGUI::resetComponentLevels ( )
protected

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

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

287  : void
288  {
289  $this->checkPermission('write');
290  foreach (ilLogComponentLevels::getInstance()->getLogComponents() as $component) {
291  $component->setLevel(null);
292  $component->update();
293  }
294  $this->tpl->setOnScreenMessage('success', $this->lng->txt('settings_saved'), true);
295  $this->ctrl->redirect($this, 'components');
296  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
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 253 of file class.ilObjLoggingSettingsGUI.php.

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

253  : void
254  {
255  $this->checkPermission('write');
256 
257  $levels = [];
258  if ($this->http->wrapper()->post()->has('level')) {
259  $levels = $this->http->wrapper()->post()->retrieve(
260  'level',
261  $this->refinery->custom()->transformation(
262  function ($arr) {
263  // keep keys(!), transform all values to int
264  return array_column(
265  array_map(
266  static function ($k, $v): array {
267  return [$k, (int) $v];
268  },
269  array_keys($arr),
270  $arr
271  ),
272  1,
273  0
274  );
275  }
276  )
277  );
278  }
279  foreach ($levels as $component_id => $value) {
280  $level = new ilLogComponentLevel($component_id, $value);
281  $level->update();
282  }
283  $this->tpl->setOnScreenMessage('success', $this->lng->txt('settings_saved'), true);
284  $this->ctrl->redirect($this, 'components');
285  }
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 112 of file class.ilObjLoggingSettingsGUI.php.

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

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

112  : void
113  {
114  $this->tabs_gui->addSubTab(
115  static::SUB_SECTION_MAIN,
116  $this->lng->txt(static::SUB_SECTION_MAIN),
117  $this->ctrl->getLinkTarget($this, 'settings')
118  );
119  $this->tabs_gui->addSubTab(
120  static::SUB_SECTION_ERROR,
121  $this->lng->txt(static::SUB_SECTION_ERROR),
122  $this->ctrl->getLinkTarget($this, 'errorSettings')
123  );
124  $this->tabs_gui->addSubTab(
125  static::SUB_SECTION_COMPONENTS,
126  $this->lng->txt(static::SUB_SECTION_COMPONENTS),
127  $this->ctrl->getLinkTarget($this, 'components')
128  );
129  $this->tabs_gui->activateSubTab($a_section);
130  }
+ 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 142 of file class.ilObjLoggingSettingsGUI.php.

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

Referenced by updateSettings().

143  {
144  if (!$this->rbac_system->checkAccess("visible,read", $this->object->getRefId())) {
145  $this->error->raiseError($this->lng->txt('permission_denied'), $this->error->MESSAGE);
146  }
147 
148  $this->tabs_gui->setTabActive(static::SECTION_SETTINGS);
149  $this->setSubTabs(static::SUB_SECTION_MAIN);
150 
151  if (!$form instanceof ilPropertyFormGUI) {
152  $form = $this->initFormSettings();
153  }
154  $this->tpl->setContent($form->getHTML());
155  $this->getLogger()->debug('Currrent level is ' . $this->getSettings()->getLevel());
156  return true;
157  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateErrorSettings()

ilObjLoggingSettingsGUI::updateErrorSettings ( )
protected

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

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

310  : void
311  {
312  $this->checkPermission('write');
313  $form = $this->initFormErrorSettings();
314  if ($form->checkInput()) {
315  $this->getErrorSettings()->setMail($form->getInput('error_mail'));
316  $this->getErrorSettings()->update();
317 
318  $this->tpl->setOnScreenMessage('success', $this->lng->txt('error_settings_saved'), true);
319  $this->ctrl->redirect($this, 'errorSettings');
320  }
321  $this->tpl->setOnScreenMessage('failure', $this->lng->txt('err_check_input'));
322  $form->setValuesByPost();
323  $this->errorSettings($form);
324  }
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 159 of file class.ilObjLoggingSettingsGUI.php.

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

159  : void
160  {
161  if (!$this->rbac_system->checkAccess('write', $this->object->getRefId())) {
162  $this->ilias->raiseError($this->lng->txt("permission_denied"), $this->ilias->error_obj->MESSAGE);
163  }
164  $form = $this->initFormSettings();
165  if ($form->checkInput()) {
166  $this->getSettings()->setLevel((int) $form->getInput('level'));
167  $this->getSettings()->enableCaching((bool) $form->getInput('cache'));
168  $this->getSettings()->setCacheLevel((int) $form->getInput('cache_level'));
169  $this->getSettings()->enableMemoryUsage((bool) $form->getInput('memory'));
170  $this->getSettings()->enableBrowserLog((bool) $form->getInput('browser'));
171  $this->getSettings()->setBrowserUsers($form->getInput('browser_users'));
172 
173  $this->getLogger()->info(print_r($form->getInput('browser_users'), true));
174 
175  $this->getSettings()->update();
176 
177  $this->tpl->setOnScreenMessage('success', $this->lng->txt('settings_saved'), true);
178  $this->ctrl->redirect($this, 'settings');
179  return;
180  }
181 
182  $this->tpl->setOnScreenMessage('failure', $this->lng->txt('err_check_input'));
183  $form->setValuesByPost();
184  $this->settings($form);
185  }
Class ilObjForumAdministration.
settings(?ilPropertyFormGUI $form=null)
+ Here is the call graph for this function:

Field Documentation

◆ $error_settings

ilLoggingErrorSettings ilObjLoggingSettingsGUI::$error_settings
protected

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

Referenced by getErrorSettings().

◆ $log

ilLogger ilObjLoggingSettingsGUI::$log
protected

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

Referenced by getLogger().

◆ $log_settings

ilLoggingDBSettings ilObjLoggingSettingsGUI::$log_settings
protected

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

Referenced by getSettings().

◆ $refinery

Refinery ilObjLoggingSettingsGUI::$refinery
protected

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

◆ SECTION_SETTINGS

const ilObjLoggingSettingsGUI::SECTION_SETTINGS = 'settings'
protected

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

◆ SUB_SECTION_COMPONENTS

const ilObjLoggingSettingsGUI::SUB_SECTION_COMPONENTS = 'log_components'
protected

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

◆ SUB_SECTION_ERROR

const ilObjLoggingSettingsGUI::SUB_SECTION_ERROR = 'log_error_settings'
protected

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

◆ SUB_SECTION_MAIN

const ilObjLoggingSettingsGUI::SUB_SECTION_MAIN = 'log_general_settings'
protected

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


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