3declare(strict_types=1);
36 $this->
lng = $DIC->language();
38 $this->history_manager =
$DIC
47 return "copg_history_cleanup";
55 return $lng->
txt(
"copg_history_cleanup_cron");
63 return $lng->
txt(
"copg_history_cleanup_cron_info");
96 $log->debug(
"----- Delete old page history entries, Start -----");
103 $log->debug(
"... $x_days days, keep $keep_entries");
105 if ($this->history_manager->deleteOldHistoryEntries($x_days, $keep_entries)) {
109 $log->debug(
"----- Delete old page history entries, End -----");
111 $result->setStatus($status);
125 $ti->setSuffix(
$lng->
txt(
"copg_days"));
126 $ti->setInfo(
$lng->
txt(
"copg_cron_days_info"));
132 $ti->setSuffix(
$lng->
txt(
"copg_entries"));
133 $ti->setInfo(
$lng->
txt(
"copg_cron_keep_entries_info"));
161 return (
int)
$settings->
get(
"copg_cron_keep_entries",
"1000");
167 $settings->
set(
"copg_cron_keep_entries", (
string) $entries);
saveCustomSettings(ilPropertyFormGUI $a_form)
getDefaultScheduleValue()
hasAutoActivation()
Is to be activated on "installation", does only work for ILIAS core cron jobs.
HistoryManager $history_manager
addCustomSettingsToForm(ilPropertyFormGUI $a_form)
setKeepEntries(int $entries)
const SCHEDULE_TYPE_DAILY
@depracated This will be replaced with an ENUM in ILIAS 9
loadLanguageModule(string $a_module)
Load language module.
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...
static getLogger(string $a_component_id)
Get component logger.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
set(string $a_key, string $a_val)
get(string $a_keyword, ?string $a_default_value=null)
get setting