19 declare(strict_types=1);
34 public function __construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output =
true)
39 $this->
lng->loadLanguageModule(
'sysc');
40 $this->repo_gui_service = $DIC->repository()->gui();
45 if ($this->
http->wrapper()->query()->has(
'grp_id')) {
46 return $this->
http->wrapper()->query()->retrieve(
56 if ($this->
http->wrapper()->query()->has(
'task_id')) {
57 return $this->
http->wrapper()->query()->retrieve(
74 $next_class = $this->
ctrl->getNextClass($this);
75 $cmd = $this->
ctrl->getCmd();
78 switch ($next_class) {
79 case 'ilobjectownershipmanagementgui':
80 $this->
setSubTabs(self::SECTION_MAIN,
'no_owner');
81 $this->tabs_gui->activateTab(
'overview');
85 $gui = $gui = $this->repo_gui_service->ownershipManagementGUI(0, $read_only);
86 $this->
ctrl->forwardCommand($gui);
89 case 'ilobjsystemfoldergui':
92 $this->
ctrl->forwardCommand($sys_folder);
94 $this->tabs_gui->clearTargets();
99 case 'ilpermissiongui':
100 $this->tabs_gui->activateTab(
'perm_settings');
103 $this->
ctrl->forwardCommand($perm_gui);
107 case 'ilobjsystemcheckgui':
108 if ($cmd ===
null || $cmd ===
'' || $cmd ===
'view') {
117 $this->
ctrl->saveParameter($this,
'grp_id');
118 $this->
ctrl->saveParameter($this,
'task_id');
119 $this->
ctrl->setReturn($this,
'showGroup');
120 $this->tabs_gui->clearTargets();
121 $this->tabs_gui->setBackTarget($this->
lng->txt(
'back'), $this->
ctrl->getLinkTarget($this,
'showGroup'));
131 $this->tabs_gui->addTab(
133 $this->
lng->txt(
'overview'),
134 $this->
ctrl->getLinkTarget($this,
'overview')
138 $this->tabs_gui->addTab(
140 $this->
lng->txt(
'perm_settings'),
141 $this->
ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'),
'perm')
148 $this->
getLang()->loadLanguageModule(
'sysc');
150 $this->
setSubTabs(self::SECTION_MAIN,
'overview');
151 $this->tabs_gui->activateTab(
'overview');
157 $this->tpl->setContent($table->getHTML());
165 $this->
ctrl->saveParameter($this,
'grp_id');
171 $this->tpl->setContent($table->getHTML());
179 $this->
setSubTabs(self::SECTION_MAIN,
'trash');
180 $this->tabs_gui->activateTab(
'overview');
184 $this->tpl->setContent($form->getHTML());
190 $form->setFormAction($this->
ctrl->getFormAction($this));
192 $form->setTitle($this->
lng->txt(
'sysc_administrate_deleted'));
199 $restore->setInfo($this->
lng->txt(
'sysc_trash_restore_info'));
200 $action->addOption($restore);
204 $remove->setInfo($this->
lng->txt(
'sysc_trash_remove_info'));
205 $action->addOption($remove);
209 $num->
setInfo($this->
lng->txt(
'purge_count_limit_desc'));
211 $num->setMinValue(1);
212 $remove->addSubItem($num);
215 $age->
setInfo($this->
lng->txt(
'purge_age_limit_desc'));
216 $age->setMinuteStepSize(15);
217 $remove->addSubItem($age);
226 foreach ($sub_objects as $obj_type) {
227 if (!$this->obj_definition->isRBACObject($obj_type) || !$this->obj_definition->isAllowedInRepository($obj_type)) {
230 $options[$obj_type] = $this->
lng->txt(
'obj_' . $obj_type);
235 $types->setOptions($options);
236 $remove->addSubItem($types);
238 $form->addItem($action);
240 $form->addCommandButton(
'handleTrashAction', $this->
lng->txt(
'start_scan'));
241 $form->addCommandButton(
'', $this->
lng->txt(
'cancel'));
249 if ($form->checkInput()) {
252 $dt = $form->getItemByPostVar(
'age')->getDate();
254 $trash->setAgeLimit($dt);
256 $trash->setNumberLimit((
int) $form->getInput(
'number'));
258 if ($form->getInput(
'types')) {
259 $trash->setTypesLimit((array) $form->getInput(
'types'));
261 $trash->setMode((
int) $form->getInput(
'type'));
264 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'settings_saved'),
true);
265 $form->setValuesByPost();
270 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'err_check_input'));
271 $form->setValuesByPost();
276 protected function setSubTabs(
string $a_section,
string $a_active): void
278 switch ($a_section) {
279 case self::SECTION_MAIN:
283 case self::SECTION_GROUP:
286 $this->tabs_gui->activateSubTab($a_active);
291 $this->tabs_gui->addSubTab(
293 $this->
getLang()->txt(
'sysc_groups'),
294 $this->
ctrl->getLinkTarget($this,
'overview')
298 $this->tabs_gui->addSubTab(
300 $this->
getLang()->txt(
'sysc_tab_trash'),
301 $this->
ctrl->getLinkTarget($this,
'trash')
305 $this->tabs_gui->addSubTab(
307 $this->
getLang()->txt(
'system_check_no_owner'),
308 $this->
ctrl->getLinkTargetByClass(
'ilobjectownershipmanagementgui')
314 $this->tabs_gui->clearTargets();
315 $this->tabs_gui->setBackTarget(
316 $this->
lng->txt(
'back'),
317 $this->
ctrl->getLinkTarget($this,
'overview')
setSubTabs(string $a_section, string $a_active)
This class represents an option in a radio group.
prepareOutput(bool $show_sub_objects=true)
trash(?ilPropertyFormGUI $form=null)
Class ilObjSystemFolderGUI.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
static http()
Fetches the global http state from ILIAS.
static getComponentTask(int $a_task_id)
__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output=true)
ILIAS Repository ExternalGUIService $repo_gui_service
Class ilObjectGUI Basic methods of all Output classes.
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
__construct(Container $dic, ilPlugin $plugin)
Table GUI for system check groups overview.
Table GUI for system check task overview.
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)