File tree Expand file tree Collapse file tree
components/ILIAS/SystemCheck Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -32,6 +32,11 @@ public function init(
3232 array | \ArrayAccess &$ pull ,
3333 array | \ArrayAccess &$ internal ,
3434 ): void {
35- // ...
35+ $ contribute [\ILIAS \Cron \CronJob::class] = static fn () =>
36+ new \ilSCCronTrash (
37+ 'components \\' . self ::class,
38+ $ use [\ILIAS \Language \Language::class],
39+ true
40+ );
3641 }
3742}
Original file line number Diff line number Diff line change 11<?php
22
3- declare (strict_types=1 );
4-
53/**
64 * This file is part of ILIAS, a powerful learning management system
75 * published by ILIAS open source e-Learning e.V.
1816 *
1917 *********************************************************************/
2018
19+ declare (strict_types=1 );
20+
2121use ILIAS \Cron \Schedule \CronJobScheduleType ;
2222
2323/**
2626 */
2727class ilSCCronTrash extends ilCronJob
2828{
29- protected ilLanguage $ lng ;
3029 protected ilTree $ tree ;
3130 protected ilObjectDefinition $ objDefinition ;
3231
33- public function __construct ()
32+ public function __construct (
33+ string $ component ,
34+ \ILIAS \Language \Language $ lng ,
35+ bool $ registration = false
36+ ) {
37+ parent ::__construct ($ component , $ lng );
38+ $ this ->lng ->loadLanguageModule ('sysc ' );
39+ if (!$ registration ) {
40+ $ this ->additionalConstruct ();
41+ }
42+ }
43+
44+ private function additionalConstruct ()
3445 {
3546 global $ DIC ;
36-
37- $ this ->lng = $ DIC ->language ();
3847 $ this ->tree = $ DIC ->repositoryTree ();
3948 $ this ->objDefinition = $ DIC ['objDefinition ' ];
40- $ this ->lng ->loadLanguageModule ('sysc ' );
4149 }
4250
4351 public function getId (): string
Original file line number Diff line number Diff line change 77 <parent id =" adm" max =" 1" >adm</parent >
88 </object >
99 </objects >
10- <crons >
11- <cron id =" sysc_trash" class =" ilSCCronTrash" />
12- </crons >
1310 <logging />
1411</service >
You can’t perform that action at this time.
0 commit comments