File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -38,5 +38,12 @@ public function init(
3838 );
3939 $ contribute [Component \Resource \PublicAsset::class] = fn () =>
4040 new Component \Resource \ComponentJS ($ this , "SkillEntries.js " );
41+
42+ $ contribute [\ILIAS \Cron \CronJob::class] = static fn () =>
43+ new \ilSkillNotifications (
44+ 'components \\' . self ::class,
45+ $ use [\ILIAS \Language \Language::class],
46+ true
47+ );
4148 }
4249}
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.
1614 * https://www.ilias.de
1715 * https://github.com/ILIAS-eLearning
1816 *
19- ********************************************************************
20- */
17+ *********************************************************************/
18+
19+ declare (strict_types=1 );
2120
2221use ILIAS \Skill \Service \SkillTreeService ;
2322use ILIAS \Cron \Schedule \CronJobScheduleType ;
2928 */
3029class ilSkillNotifications extends ilCronJob
3130{
32- protected ilLanguage $ lng ;
3331 protected ilObjUser $ user ;
3432 protected ilIniFile $ client_ini ;
3533 protected ilTree $ tree ;
3634 protected SkillTreeService $ tree_service ;
3735
38- public function __construct ()
36+ public function __construct (
37+ string $ component ,
38+ \ILIAS \Language \Language $ lng ,
39+ bool $ registration = false
40+ ) {
41+ parent ::__construct ($ component , $ lng );
42+ if (!$ registration ) {
43+ $ this ->additionalConstruct ();
44+ }
45+ }
46+
47+ private function additionalConstruct ()
3948 {
4049 global $ DIC ;
4150
42- $ this ->lng = $ DIC ->language ();
4351 if (isset ($ DIC ["ilUser " ])) {
4452 $ this ->user = $ DIC ->user ();
4553 }
Original file line number Diff line number Diff line change 1919 <event type =" listen" id =" components/ILIAS/Object" />
2020 <event type =" raise" id =" deleteSkill" />
2121 </events >
22- <crons >
23- <cron id =" skll_notification" class =" ilSkillNotifications" />
24- </crons >
2522</service >
You can’t perform that action at this time.
0 commit comments