@@ -41,7 +41,6 @@ class ilForumCronNotification extends ilCronJob
4141 /** @var array<int, ilObjCourse|ilObjGroup|null> */
4242 private static array $ container_by_frm_ref_id = [];
4343
44- private readonly ilLanguage $ lng ;
4544 private readonly ilSetting $ settings ;
4645 private ilLogger $ logger ;
4746 private ilTree $ tree ;
@@ -51,22 +50,26 @@ class ilForumCronNotification extends ilCronJob
5150 private readonly \ILIAS \Refinery \Factory $ refinery ;
5251 private readonly ilCronManager $ cronManager ;
5352
53+
5454 public function __construct (
55- ilDBInterface $ database = null ,
56- ilForumNotificationCache $ notificationCache = null ,
57- ilLanguage $ lng = null ,
58- ilSetting $ settings = null ,
59- \ILIAS \Refinery \Factory $ refinery = null ,
60- ilCronManager $ cronManager = null
55+ string $ component ,
56+ \ILIAS \Language \Language $ lng ,
57+ bool $ registration = false
6158 ) {
62- global $ DIC ;
59+ parent ::__construct ($ component , $ lng );
60+ if (!$ registration ) {
61+ $ this ->additionalConstruct ();
62+ }
63+ }
6364
64- $ this ->settings = $ settings ?? new ilSetting ('frma ' );
65- $ this ->lng = $ lng ?? $ DIC ->language ();
66- $ this ->ilDB = $ database ?? $ DIC ->database ();
67- $ this ->notificationCache = $ notificationCache ?? new ilForumNotificationCache ();
68- $ this ->refinery = $ refinery ?? $ DIC ->refinery ();
69- $ this ->cronManager = $ cronManager ?? $ DIC ->cron ()->manager ();
65+ private function additionalConstruct ()
66+ {
67+ global $ DIC ;
68+ $ this ->settings = new ilSetting ('frma ' );
69+ $ this ->ilDB = $ DIC ->database ();
70+ $ this ->notificationCache = new ilForumNotificationCache ();
71+ $ this ->refinery = $ DIC ->refinery ();
72+ $ this ->cronManager = $ DIC ->cron ()->manager ();
7073 }
7174
7275 public function getId (): string
0 commit comments