File tree Expand file tree Collapse file tree
components/ILIAS/Tracking Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -39,5 +39,12 @@ public function init(
3939 $ contribute [SetupAgentInterface::class] = fn () => new SetupAgent ($ pull [Refinery::class]);
4040 $ contribute [Component \Resource \PublicAsset::class] = fn () =>
4141 new Component \Resource \ComponentJS ($ this , "ilObjStat.js " );
42+
43+ $ contribute [\ILIAS \Cron \CronJob::class] = static fn () =>
44+ new \ilLPCronObjectStatistics (
45+ self ::class,
46+ $ use [Language \Language::class],
47+ $ use [\ILIAS \Logging \LoggerFactory::class]
48+ );
4249 }
4350}
Original file line number Diff line number Diff line change 2828class ilLPCronObjectStatistics extends ilCronJob
2929{
3030 protected int $ date = 0 ;
31-
32- protected ilLanguage $ lng ;
3331 protected ilDBInterface $ db ;
3432 protected ilTree $ tree ;
3533 protected ilLogger $ logger ;
3634 protected ilCronManager $ cron_manager ;
3735
38- public function __construct ()
36+ public function init (): void
3937 {
40- global $ DIC ;
38+ $ this ->lng ->loadLanguageModule ('trac ' );
39+ $ this ->logger = $ this ->logger_factory ->getLogger ('trac ' );
4140
42- $ this ->logger = $ DIC ->logger ()->trac ();
43- $ this ->lng = $ DIC ->language ();
44- $ this ->lng ->loadLanguageModule ("trac " );
41+ global $ DIC ;
4542 $ this ->db = $ DIC ->database ();
4643 $ this ->tree = $ DIC ->repositoryTree ();
4744 $ this ->cron_manager = $ DIC ->cron ()->manager ();
Original file line number Diff line number Diff line change 1717 <event type =" listen" id =" components/ILIAS/Group" />
1818 <event type =" listen" id =" components/ILIAS/LearningSequence" />
1919 </events >
20- <crons >
21- <cron id =" lp_object_statistics" class =" ilLPCronObjectStatistics" />
22- </crons >
2320 <logging />
2421</service >
You can’t perform that action at this time.
0 commit comments