- md5
- 1a52930b16b5c5599d1d32646c6f3e53
- sha1
- 951f446c82392040fbd44734185b3c01b3237eb6
- sha256
- febbde7930cd188eb1c662dde490aecfc52dcaa06d6e1b73875eeda913842391
<?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\Plugin\PluginHelper;
use Joomla\CMS\User\UserFactoryInterface;
use Joomla\Database\DatabaseInterface;
use Joomla\DI\Container;
use Joomla\DI\ServiceProviderInterface;
use Joomla\Event\DispatcherInterface;
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,
function (Container $container) {
$plugin = new TaskNotification(
$container->get(DispatcherInterface::class),
(array) PluginHelper::getPlugin('system', 'tasknotification')
);
$plugin->setApplication(Factory::getApplication());
$plugin->setDatabase($container->get(DatabaseInterface::class));
$plugin->setUserFactory($container->get(UserFactoryInterface::class));
return $plugin;
}
);
}
};
The same content is in 6 releases, Joomla 5.0.0-alpha2 to 5.0.0-beta3. See them all, or every version of this file.