3 declare(strict_types=1);
35 $this->
lng = $DIC->language();
36 $this->tree = $DIC->repositoryTree();
37 $this->objDefinition = $DIC[
'objDefinition'];
38 $this->
lng->loadLanguageModule(
'sysc');
48 return $this->
lng->txt(
'sysc_cron_empty_trash');
53 return $this->
lng->txt(
'sysc_cron_empty_trash_desc');
58 return self::SCHEDULE_TYPE_WEEKLY;
64 self::SCHEDULE_TYPE_DAILY,
65 self::SCHEDULE_TYPE_WEEKLY,
66 self::SCHEDULE_TYPE_MONTHLY,
67 self::SCHEDULE_TYPE_QUARTERLY,
68 self::SCHEDULE_TYPE_YEARLY
94 $this->
lng->loadLanguageModule(
'sysc');
101 $num->setInfo($this->
lng->txt(
'purge_count_limit_desc'));
103 $num->setMinValue(1);
104 $num->setValue(
$settings->get(
'num',
''));
109 $age->setInfo($this->
lng->txt(
'purge_age_limit_desc'));
111 $age->setMinValue(1);
112 $age->setMaxLength(4);
115 $age->setValue(
$settings->get(
'age',
''));
122 $sub_objects = $this->tree->lookupTrashedObjectTypes();
126 foreach ($sub_objects as $obj_type) {
127 if (!$this->objDefinition->isRBACObject($obj_type) || !$this->objDefinition->isAllowedInRepository($obj_type)) {
130 $options[$obj_type] = $this->
lng->txt(
'obj_' . $obj_type);
133 $types->setOptions($options);
134 $types->setValue(
$settings->get(
'types',
''));
142 if ((
string) $a_form->
getInput(
'number') ===
'') {
148 if ((
string) $a_form->
getInput(
'age') ===
'') {
154 if ($a_form->
getInput(
'types') ===
'') {
170 $trash->setNumberLimit((
int)
$settings->get(
'num',
'0'));
171 $trash->setTypesLimit(array_filter([
$settings->get(
'types',
'')]));
177 $trash->setAgeLimit($date);
ilObjectDefinition $objDefinition
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
saveCustomSettings(ilPropertyFormGUI $a_form)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
parses the objects.xml it handles the xml-description of all ilias objects
getDefaultScheduleValue()
addCustomSettingsToForm(ilPropertyFormGUI $a_form)