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,11 @@ 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+ $ contribute [\ILIAS \Cron \CronJob::class] = static fn () =>
43+ new \ilLPCronObjectStatistics (
44+ 'components \\' . self ::class,
45+ $ use [\ILIAS \Language \Language::class],
46+ true
47+ );
4248 }
4349}
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 __construct (
37+ string $ component ,
38+ \ILIAS \Language \Language $ lng ,
39+ bool $ registration = false
40+ ) {
41+ parent ::__construct ($ component , $ lng );
42+ $ this ->lng ->loadLanguageModule ('trac ' );
43+ if (!$ registration ) {
44+ $ this ->additionalConstruct ();
45+ }
46+ }
47+
48+ private function additionalConstruct ()
3949 {
4050 global $ DIC ;
41-
4251 $ this ->logger = $ DIC ->logger ()->trac ();
43- $ this ->lng = $ DIC ->language ();
44- $ this ->lng ->loadLanguageModule ("trac " );
4552 $ this ->db = $ DIC ->database ();
4653 $ this ->tree = $ DIC ->repositoryTree ();
4754 $ 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