- md5
- d04f62559e19769cf319fd8bcb78a3eb
- sha1
- b6e4fe301f732b8310dbcdfdf27439da85642b7f
- sha256
- bba24f048574a8f4aa5a5998e5db3672eaea0fb3dc746ca29907f8ef45029f45
<?php
/**
* @package Joomla.Plugin
* @subpackage Task.PrivacyConsent
*
* @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\Task\PrivacyConsent\Extension\PrivacyConsent;
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)
{
$container->set(
PluginInterface::class,
$container->lazy(PrivacyConsent::class, function (Container $container) {
$plugin = new PrivacyConsent(
(array) PluginHelper::getPlugin('task', 'privacyconsent')
);
$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.