- md5
- 83e83db6fe18c8d56cbd292e938d04d5
- sha1
- 6d376c7931630f82a175e84c975bdbad5ad2b8fc
- sha256
- 2f0a7e2bd2f8f660832d5d580bc151dc4e514af4994b4e672dfdb50da7473c86
<?php
/**
* @package Joomla.Plugin
* @subpackage Task.updatenotification
*
* @copyright (C) 2023 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
\defined('_JEXEC') or die;
use Joomla\CMS\Extension\PluginInterface;
use Joomla\CMS\Factory;
use Joomla\CMS\Language\LanguageFactoryInterface;
use Joomla\CMS\Mail\MailerFactoryInterface;
use Joomla\CMS\Plugin\PluginHelper;
use Joomla\Database\DatabaseInterface;
use Joomla\DI\Container;
use Joomla\DI\ServiceProviderInterface;
use Joomla\Plugin\Task\UpdateNotification\Extension\UpdateNotification;
return new class () implements ServiceProviderInterface {
/**
* Registers the service provider with a DI container.
*
* @param Container $container The DI container.
*
* @return void
*
* @since 5.0.0
*/
public function register(Container $container): void
{
$container->set(
PluginInterface::class,
$container->lazy(UpdateNotification::class, function (Container $container) {
$plugin = new UpdateNotification(
(array) PluginHelper::getPlugin('task', 'updatenotification')
);
$plugin->setApplication(Factory::getApplication());
$plugin->setDatabase($container->get(DatabaseInterface::class));
$plugin->setMailerFactory($container->get(MailerFactoryInterface::class));
$plugin->setLanguageFactory($container->get(LanguageFactoryInterface::class));
return $plugin;
})
);
}
};
The same content is in 9 releases, Joomla 6.2.0-alpha2 to 6.2.1-rc1. See them all, or every version of this file.