File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -42,5 +42,12 @@ public function init(
4242
4343 $ contribute [Component \Resource \PublicAsset::class] = fn () =>
4444 new Component \Resource \ComponentJS ($ this , "js/dist/wopi.min.js " );
45+
46+ $ contribute [\ILIAS \Cron \CronJob::class] = static fn () =>
47+ new \ilWOPICrawler (
48+ self ::class,
49+ $ use [\ILIAS \Language \Language::class],
50+ $ use [\ILIAS \Logging \LoggerFactory::class]
51+ );
4552 }
4653}
Original file line number Diff line number Diff line change 3131 */
3232class ilWOPICrawler extends ilCronJob
3333{
34- private ilLanguage $ language ;
3534 private ilSetting $ settings ;
3635 private Crawler $ crawler ;
3736 private AppRepository $ app_repository ;
3837 private ActionRepository $ action_repository ;
3938
40- public function __construct ()
39+ public function init (): void
4140 {
41+ $ this ->lng ->loadLanguageModule ('wopi ' );
42+
4243 global $ DIC ;
43- $ this ->language = $ DIC ->language ();
44- $ this ->language ->loadLanguageModule ('wopi ' );
4544 $ this ->settings = $ DIC ->settings ();
4645 $ this ->crawler = new Crawler ();
47-
4846 $ this ->app_repository = new AppDBRepository ($ DIC ->database ());
4947 $ this ->action_repository = new ActionDBRepository ($ DIC ->database ());
5048 }
@@ -56,12 +54,12 @@ public function getId(): string
5654
5755 public function getTitle (): string
5856 {
59- return $ this ->language ->txt ('wopi_crawler_cronjob_title ' );
57+ return $ this ->lng ->txt ('wopi_crawler_cronjob_title ' );
6058 }
6159
6260 public function getDescription (): string
6361 {
64- return $ this ->language ->txt ('wopi_crawler_cronjob_description ' );
62+ return $ this ->lng ->txt ('wopi_crawler_cronjob_description ' );
6563 }
6664
6765 public function hasAutoActivation (): bool
Original file line number Diff line number Diff line change 11<?xml version = " 1.0" encoding = " UTF-8" ?>
22<service xmlns =" http://www.w3.org" version =" $Id$" id =" wopi" >
3- <crons >
4- <cron id =" wopi_crawler" class =" ilWOPICrawler" />
5- </crons >
63 <logging />
74</service >
You can’t perform that action at this time.
0 commit comments