CoreFiles by mySites.guru
provider.php44 lines, 1,223 bytes, from Joomla_6.1.2-Stable-Full_Package.zip
Raw History Compare with 6.1.1
md5
7463c346bae272dd646a09244dbcafd7
sha1
484af34d0f385cf9d95a751908ee1b67527620a6
sha256
806395cec53e479ddbe4813afe0066d416f7d496f3d2517c7c77982007cb485d
<?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,
            $container->lazy(Checkboxes::class, function (Container $container) {
                $plugin     = new Checkboxes(
                    (array) PluginHelper::getPlugin('fields', 'checkboxes')
                );
                $plugin->setApplication(Factory::getApplication());

                return $plugin;
            })
        );
    }
};

The same content is in 28 releases, Joomla 6.1.0-beta1 to 6.2.1-rc1. See them all, or every version of this file.