File tree Expand file tree Collapse file tree
components/ILIAS/BookingManager Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -39,5 +39,17 @@ public function init(
3939
4040 $ contribute [Component \Resource \PublicAsset::class] = fn () =>
4141 new Component \Resource \ComponentJS ($ this , "ScheduleInput.js " );
42+
43+ $ contribute [\ILIAS \Cron \CronJob::class] = static fn () =>
44+ new \ilBookCronNotification (
45+ 'components \\' . self ::class,
46+ $ use [\ILIAS \Language \Language::class],
47+ true
48+ );
49+ $ contribute [\ILIAS \Cron \CronJob::class] = static fn () =>
50+ new \ilBookingPrefBookCron (
51+ 'components \\' . self ::class,
52+ $ use [\ILIAS \Language \Language::class]
53+ );
4254 }
4355}
Original file line number Diff line number Diff line change 2525class ilBookCronNotification extends ilCronJob
2626{
2727 protected \ILIAS \BookingManager \InternalRepoService $ repo ;
28- protected ilLanguage $ lng ;
2928 protected ilLogger $ book_log ;
3029
31- public function __construct ()
30+ public function __construct (
31+ string $ component ,
32+ \ILIAS \Language \Language $ lng ,
33+ bool $ registration = false
34+ ) {
35+ parent ::__construct ($ component , $ lng );
36+ $ this ->lng ->loadLanguageModule ('dateplaner ' );
37+ if (!$ registration ) {
38+ $ this ->additionalConstruct ();
39+ }
40+ }
41+
42+ private function additionalConstruct ()
3243 {
3344 global $ DIC ;
34-
35- $ this ->lng = $ DIC ->language ();
36-
3745 $ this ->book_log = ilLoggerFactory::getLogger ("book " );
3846 $ this ->repo = $ DIC ->bookingManager ()
3947 ->internal ()
Original file line number Diff line number Diff line change 2626 */
2727class ilBookingPrefBookCron extends ilCronJob
2828{
29- protected ilLanguage $ lng ;
30-
31- public function __construct ()
32- {
33- global $ DIC ;
34-
35- $ this ->lng = $ DIC ->language ();
36- }
37-
3829 public function getId (): string
3930 {
4031 return "book_pref_book " ;
Original file line number Diff line number Diff line change 2121 <web_access_checker >
2222 <secure_path path =" ilBookingManager" checking-class =" ilObjBookingPoolAccess" />
2323 </web_access_checker >
24- <crons >
25- <cron id =" book_notification" class =" ilBookCronNotification" />
26- <cron id =" book_pref_book" class =" ilBookingPrefBookCron" />
27- </crons >
2824 <logging />
2925</module >
You can’t perform that action at this time.
0 commit comments