CoreFiles by mySites.guru
provider.php47 lines, 1,350 bytes, from Joomla_4.4.13-Stable-Full_Package.zip
Raw History Compare with 4.4.12
md5
f50f7c732680571288a1486c1599cdf4
sha1
cb2af6c8a00edae2251100ee162561ca53eeca27
sha256
9bcb66a25dacea78cf0b0de3a1d754edffa30ddefb716c470fde0373fe6f63e9
<?php

/**
 * @package     Joomla.Plugin
 * @subpackage  Quickicon.privacycheck
 *
 * @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\Event\DispatcherInterface;
use Joomla\Plugin\Quickicon\PrivacyCheck\Extension\PrivacyCheck;

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,
            function (Container $container) {
                $dispatcher = $container->get(DispatcherInterface::class);
                $plugin     = new PrivacyCheck(
                    $dispatcher,
                    (array) PluginHelper::getPlugin('quickicon', 'privacycheck')
                );
                $plugin->setApplication(Factory::getApplication());

                return $plugin;
            }
        );
    }
};

The same content is in 54 releases, Joomla 4.3.0-beta1 to 5.0.0-alpha1. See them all, or every version of this file.