diff --git a/README.md b/README.md index dafacb7..a556c16 100644 --- a/README.md +++ b/README.md @@ -18,8 +18,8 @@ in this document are to be interpreted as described in ## Requirements -* PHP: [![Minimum PHP Version](https://img.shields.io/badge/Minimum_PHP-7.4.x-blue.svg)](https://php.net/) [![Maximum PHP Version](https://img.shields.io/badge/Maximum_PHP-8.0.x-blue.svg)](https://php.net/) -* ILIAS: [![Minimum ILIAS Version](https://img.shields.io/badge/Minimum_ILIAS-8.x-orange.svg)](https://ilias.de/) [![Maximum ILIAS Version](https://img.shields.io/badge/Maximum_ILIAS-8.x-orange.svg)](https://ilias.de/) +* PHP: [![Minimum PHP Version](https://img.shields.io/badge/Minimum_PHP-8.2.x-blue.svg)](https://php.net/) [![Maximum PHP Version](https://img.shields.io/badge/Maximum_PHP-8.3.x-blue.svg)](https://php.net/) +* ILIAS: [![Minimum ILIAS Version](https://img.shields.io/badge/Minimum_ILIAS-11.x-orange.svg)](https://ilias.de/) [![Maximum ILIAS Version](https://img.shields.io/badge/Maximum_ILIAS-8.x-orange.svg)](https://ilias.de/) ## Installation @@ -28,7 +28,7 @@ This plugin MUST be installed as a The files MUST be saved in the following directory: - /Customizing/global/plugins/Services/UIComponent/UserInterfaceHook/TestCronInterface + /components/TestCronInterface Correct file and folder permissions MUST be ensured by the responsible system administrator. diff --git a/TestCronInterface.php b/TestCronInterface.php new file mode 100644 index 0000000..a8fd4a6 --- /dev/null +++ b/TestCronInterface.php @@ -0,0 +1,43 @@ + + new Plugin\TestCronInterface\Cron\TestCronInterfaceJob( + self::class, + $use[\ILIAS\Language\Language::class], + $use[\ILIAS\Logging\LoggerFactory::class], + ); + + } +} diff --git a/classes/Cron/TestCronInterfaceJob.php b/classes/Cron/TestCronInterfaceJob.php index c132259..d749754 100644 --- a/classes/Cron/TestCronInterfaceJob.php +++ b/classes/Cron/TestCronInterfaceJob.php @@ -1,15 +1,17 @@ plugin = $plugin; - $this->logger = $logger; - } - - /** * @inheritDoc */ @@ -97,13 +89,14 @@ public function isManuallyExecutable(): bool */ public function run(): ilCronJobResult { - $this->logger->info('Started job'); + $logger = $this->logger_factory::getRootLogger(); + $logger->info('Started job'); $result = new ilCronJobResult(); $result->setStatus(ilCronJobResult::STATUS_OK); $result->setMessage('Successfully finished job'); - $this->logger->info($result->getMessage()); + $logger->info($result->getMessage()); return $result; } diff --git a/composer.json b/composer.json index d424c19..be306bb 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "require": { - "php": ">=8.1 <8.3" + "php": ">=8.2 <8.4" }, "autoload": { "psr-4" : { "ILIAS\\Plugin\\TestCronInterface\\" : "./classes" }, diff --git a/plugin.php b/plugin.php deleted file mode 100644 index 87dc121..0000000 --- a/plugin.php +++ /dev/null @@ -1,13 +0,0 @@ - - */ -$id = 'tstcroninterface'; -$version = '1.0'; -$ilias_min_version = '9.0'; -$ilias_max_version = '9.999'; -$responsible = 'Michael Jansen'; -$responsible_mail = 'mjansen@databay.de';