CoreFiles by mySites.guru
provider.php44 lines, 1,186 bytes, from Joomla_5.4.3-Stable-Full_Package.zip
Raw History Compare with 5.4.2
md5
22a64b2a4a8b5097e75feb9b01f80df9
sha1
4810a97f4edc7dfdc687116c4f75aa8c05bcb9d5
sha256
5bb6af72bac3d836872d28558d37d4c0c0d0708c1b923d57fb896945792e089b
<?php

/**
 * @package     Joomla.Plugin
 * @subpackage  Fields.checkboxes
 *
 * @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\DI\Container;
use Joomla\DI\ServiceProviderInterface;
use Joomla\Plugin\Fields\Checkboxes\Extension\Checkboxes;

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) {
                $plugin     = new Checkboxes(
                    (array) PluginHelper::getPlugin('fields', 'checkboxes')
                );
                $plugin->setApplication(Factory::getApplication());

                return $plugin;
            }
        );
    }
};

The same content is in 43 releases, Joomla 5.4.0-beta2 to 6.1.0-alpha3. See them all, or every version of this file.