11<?php
22
3- /* Copyright (c) 1998-2010 ILIAS open source, Extended GPL, see docs/LICENSE */
3+ /**
4+ * This file is part of ILIAS, a powerful learning management system
5+ * published by ILIAS open source e-Learning e.V.
6+ *
7+ * ILIAS is licensed with the GPL-3.0,
8+ * see https://www.gnu.org/licenses/gpl-3.0.en.html
9+ * You should have received a copy of said license along with the
10+ * source code, too.
11+ *
12+ * If this is not the case or you just want to try ILIAS, you'll find
13+ * us at:
14+ * https://www.ilias.de
15+ * https://github.com/ILIAS-eLearning
16+ *
17+ *********************************************************************/
418
519use ILIAS \Cron \Schedule \CronJobScheduleType ;
620
@@ -16,17 +30,24 @@ class ilCronEcsTaskScheduler extends \ilCronJob
1630 public const DEFAULT_SCHEDULE_VALUE = 1 ;
1731
1832 private ilLogger $ logger ;
19- private ilLanguage $ lng ;
2033 private ilCronJobResult $ result ;
2134
22- public function __construct ()
35+ public function __construct (
36+ string $ component ,
37+ \ILIAS \Language \Language $ lng ,
38+ bool $ registration = false
39+ ) {
40+ parent ::__construct ($ component , $ lng );
41+ $ this ->lng ->loadLanguageModule ('ecs ' );
42+ if (!$ registration ) {
43+ $ this ->additionalConstruct ();
44+ }
45+ }
46+
47+ private function additionalConstruct ()
2348 {
2449 global $ DIC ;
25-
2650 $ this ->logger = $ DIC ->logger ()->wsrv ();
27- $ this ->lng = $ DIC ->language ();
28- $ this ->lng ->loadLanguageModule ('ecs ' );
29-
3051 $ this ->result = new \ilCronJobResult ();
3152 }
3253
0 commit comments