File tree Expand file tree Collapse file tree
components/ILIAS/Membership Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -32,6 +32,17 @@ public function init(
3232 array | \ArrayAccess &$ pull ,
3333 array | \ArrayAccess &$ internal ,
3434 ): void {
35- // ...
35+ $ contribute [\ILIAS \Cron \CronJob::class] = static fn () =>
36+ new \ilMembershipCronMinMembers (
37+ 'components \\' . self ::class,
38+ $ use [\ILIAS \Language \Language::class]
39+ );
40+ $ contribute [\ILIAS \Cron \CronJob::class] = static fn () =>
41+ new \ilMembershipCronNotifications (
42+ 'components \\' . self ::class,
43+ $ use [\ILIAS \Language \Language::class],
44+ true
45+ );
46+
3647 }
3748}
Original file line number Diff line number Diff line change 11<?php
22
3- declare (strict_types=1 );
4-
5-
6-
73/**
84 * This file is part of ILIAS, a powerful learning management system
95 * published by ILIAS open source e-Learning e.V.
2016 *
2117 *********************************************************************/
2218
19+ declare (strict_types=1 );
20+
2321use ILIAS \Cron \Schedule \CronJobScheduleType ;
2422
2523/**
2927 */
3028class ilMembershipCronMinMembers extends ilCronJob
3129{
32- protected ilLanguage $ lng ;
33-
34- public function __construct ()
35- {
36- global $ DIC ;
37-
38- $ this ->lng = $ DIC ->language ();
39- }
40-
4130 public function getId (): string
4231 {
4332 return "mem_min_members " ;
Original file line number Diff line number Diff line change 11<?php
22
3- declare (strict_types=1 );
4-
5-
6-
73/**
84 * This file is part of ILIAS, a powerful learning management system
95 * published by ILIAS open source e-Learning e.V.
2016 *
2117 *********************************************************************/
2218
19+ declare (strict_types=1 );
20+
2321use ILIAS \Cron \Schedule \CronJobScheduleType ;
2422
2523/**
2826 */
2927class ilMembershipCronNotifications extends ilCronJob
3028{
31- protected ilLanguage $ lng ;
3229 protected ilDBInterface $ db ;
3330 protected ilLogger $ logger ;
3431 protected ilTree $ tree ;
3532
36- public function __construct ()
33+ public function __construct (
34+ string $ component ,
35+ \ILIAS \Language \Language $ lng ,
36+ bool $ registration = false
37+ ) {
38+ parent ::__construct ($ component , $ lng );
39+ if (!$ registration ) {
40+ $ this ->additionalConstruct ();
41+ }
42+ }
43+
44+ private function additionalConstruct ()
3745 {
3846 global $ DIC ;
39-
40- $ this ->lng = $ DIC ->language ();
4147 $ this ->db = $ DIC ->database ();
4248 $ this ->logger = $ DIC ->logger ()->mmbr ();
4349 $ this ->tree = $ DIC ->repositoryTree ();
Original file line number Diff line number Diff line change 11<?php
22
3- declare (strict_types=1 );
4-
5-
6-
73/**
84 * This file is part of ILIAS, a powerful learning management system
95 * published by ILIAS open source e-Learning e.V.
2016 *
2117 *********************************************************************/
2218
19+ declare (strict_types=1 );
20+
2321use ILIAS \Notes \Service ;
2422
2523/**
Original file line number Diff line number Diff line change 33 <baseclasses >
44 <baseclass name =" ilMembershipOverviewGUI" dir =" classes" />
55 </baseclasses >
6- <crons >
7- <cron id =" mem_notification" class =" ilMembershipCronNotifications" path =" Services/Membership/classes/Cron" />
8- <cron id =" mem_min_members" class =" ilMembershipCronMinMembers" path =" Services/Membership/classes/Cron" />
9- </crons >
106 <logging />
117</service >
You can’t perform that action at this time.
0 commit comments