19 declare(strict_types=1);
39 $this->
lng = $DIC->language();
41 $this->history_manager = $DIC
50 return "copg_history_cleanup";
58 return $lng->
txt(
"copg_history_cleanup_cron");
66 return $lng->
txt(
"copg_history_cleanup_cron_info");
71 return JobScheduleType::DAILY;
99 $log->debug(
"----- Delete old page history entries, Start -----");
101 $status = JobResult::STATUS_NO_ACTION;
106 $log->debug(
"... $x_days days, keep $keep_entries");
108 if ($this->history_manager->deleteOldHistoryEntries($x_days, $keep_entries)) {
109 $status = JobResult::STATUS_OK;
112 $log->debug(
"----- Delete old page history entries, End -----");
114 $result->setStatus($status);
124 $lng->
txt(
"copg_cron_days"),
128 $ti->setSuffix($lng->
txt(
"copg_days"));
129 $ti->setInfo($lng->
txt(
"copg_cron_days_info"));
135 $ti->setSuffix($lng->
txt(
"copg_entries"));
136 $ti->setInfo($lng->
txt(
"copg_cron_keep_entries_info"));
152 return (
int) $settings->
get(
"copg_cron_days",
"3600");
158 $settings->
set(
"copg_cron_days", (
string) $days);
164 return (
int) $settings->
get(
"copg_cron_keep_entries",
"1000");
170 $settings->
set(
"copg_cron_keep_entries", (
string) $entries);
get(string $a_keyword, ?string $a_default_value=null)
get setting
static getLogger(string $a_component_id)
Get component logger.
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
set(string $a_key, string $a_val)
loadLanguageModule(string $a_module)
Load language module.
getDefaultScheduleValue()
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
HistoryManager $history_manager
addCustomSettingsToForm(ilPropertyFormGUI $a_form)
saveCustomSettings(ilPropertyFormGUI $a_form)
setKeepEntries(int $entries)