File tree Expand file tree Collapse file tree
components/ILIAS/MetaData Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -42,5 +42,13 @@ public function init(
4242
4343 $ contribute [Component \Resource \PublicAsset::class] = fn () =>
4444 new Component \Resource \Endpoint ($ this , "oai.php " );
45+
46+ $ contribute [\ILIAS \Cron \CronJob::class] = static fn () =>
47+ new \ilCronOerHarvester (
48+ 'components \\' . self ::class,
49+ $ use [\ILIAS \Language \Language::class],
50+ true
51+ );
52+
4553 }
4654}
Original file line number Diff line number Diff line change @@ -33,18 +33,25 @@ class ilCronOerHarvester extends ilCronJob
3333 protected const DEFAULT_SCHEDULE_VALUE = 1 ;
3434
3535 private ilLogger $ logger ;
36- private ilLanguage $ lng ;
3736 private Initiator $ initiator ;
3837 private SettingsInterface $ settings ;
3938
40- public function __construct ()
39+ public function __construct (
40+ string $ component ,
41+ \ILIAS \Language \Language $ lng ,
42+ bool $ registration = false
43+ ) {
44+ parent ::__construct ($ component , $ lng );
45+ $ this ->lng ->loadLanguageModule ('meta ' );
46+ if (!$ registration ) {
47+ $ this ->additionalConstruct ();
48+ }
49+ }
50+
51+ private function additionalConstruct ()
4152 {
4253 global $ DIC ;
43-
4454 $ this ->logger = $ DIC ->logger ()->meta ();
45- $ this ->lng = $ DIC ->language ();
46- $ this ->lng ->loadLanguageModule ('meta ' );
47-
4855 $ this ->initiator = new Initiator ($ DIC );
4956 $ this ->settings = $ this ->initiator ->settings ();
5057 }
Original file line number Diff line number Diff line change 99 <parent id =" adm" max =" 1" >adm</parent >
1010 </object >
1111 </objects >
12- <crons >
13- <cron id =" meta_oer_harvester" class =" ilCronOerHarvester" />
14- </crons >
1512 <logging />
1613</service >
You can’t perform that action at this time.
0 commit comments