CoreFiles by mySites.guru
provider.php44 lines, 1,250 bytes, from Joomla_6.1.4-Stable-Full_Package.zip
Raw History Compare with 6.1.3
md5
3c3f682b72d154bd29b2aa6fda02588e
sha1
688a1a76a231b6e02a51596504cf877dbebc248f
sha256
28a0ec0060358981a9c098487852392302af96647736daad1e98277c2f964131
<?php

/**
 * @package     Joomla.Plugin
 * @subpackage  Content.confirmconsent
 *
 * @copyright   (C) 2022 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\DI\Container;
use Joomla\DI\ServiceProviderInterface;
use Joomla\Plugin\Content\ConfirmConsent\Extension\ConfirmConsent;

return new class () implements ServiceProviderInterface {
    /**
     * Registers the service provider with a DI container.
     *
     * @param   Container  $container  The DI container.
     *
     * @return  void
     *
     * @since   4.3.0
     */
    public function register(Container $container)
    {
        $container->set(
            PluginInterface::class,
            $container->lazy(ConfirmConsent::class, function (Container $container) {
                $plugin     = new ConfirmConsent(
                    (array) PluginHelper::getPlugin('content', 'confirmconsent')
                );
                $plugin->setApplication(Factory::getApplication());

                return $plugin;
            })
        );
    }
};

The same content is in 30 releases, Joomla 6.1.0-beta1 to 6.3.0-alpha1. See them all, or every version of this file.