CoreFiles by mySites.guru
provider.php44 lines, 1,181 bytes, from Joomla_6.1.4-Stable-Full_Package.zip
Raw History Compare with 6.1.3
md5
3ba23005f1c3758fb58e3c9bfcbb24ea
sha1
80723c5ad1b5938e6136b25505f88ad95a49cd5f
sha256
de2f1557644e3a050dad9543f191c89c189265600f321d8b747aaec5625f2bb7
<?php

/**
 * @package     Joomla.Plugin
 * @subpackage  Fields.url
 *
 * @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\Url\Extension\Url;

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(Url::class, function (Container $container) {
                $plugin     = new Url(
                    (array) PluginHelper::getPlugin('fields', 'url')
                );
                $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.