CoreFiles by mySites.guru
provider.php46 lines, 1,269 bytes, from Joomla_6.0.0-beta1-Beta-Full_Package.zip
Raw History Compare with 5.4.0-beta3
md5
a4163a148f65db4af44466f2fac98624
sha1
580ca80934b462f64f7d469ab19f73d9d1fbbe26
sha256
1969e11492bbd2077499f9ef17a807ef8a3a4dbfedaa4e582ff96bfe1b004a72
<?php

/**
 * @package     Joomla.Plugin
 * @subpackage  Fields.number
 *
 * @copyright   (C) 2025 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\Fields\Number\Extension\Number;

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

                return $plugin;
            }
        );
    }
};

No other release has this exact content. See every version of this file.