- md5
- 6c618133e5efed0679c2370760c8d397
- sha1
- 4822d32f3acd401f776dc7b62b2e6681e5038b4f
- sha256
- 3552aeab053dcc13edce679cba73116d2f98d68c277f23cdf5af7f8e975c10c6
<?php
/**
* @package Joomla.Plugin
* @subpackage System.tasknotification
*
* @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\CMS\User\UserFactoryInterface;
use Joomla\Database\DatabaseInterface;
use Joomla\DI\Container;
use Joomla\DI\ServiceProviderInterface;
use Joomla\Plugin\System\TaskNotification\Extension\TaskNotification;
return new class () implements ServiceProviderInterface {
/**
* Registers the service provider with a DI container.
*
* @param Container $container The DI container.
*
* @return void
*
* @since 4.4.0
*/
public function register(Container $container): void
{
$container->set(
PluginInterface::class,
$container->lazy(TaskNotification::class, function (Container $container) {
$plugin = new TaskNotification(
(array) PluginHelper::getPlugin('system', 'tasknotification')
);
$plugin->setApplication(Factory::getApplication());
$plugin->setDatabase($container->get(DatabaseInterface::class));
$plugin->setUserFactory($container->get(UserFactoryInterface::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.