CoreFiles by mySites.guru
provider.php46 lines, 1,254 bytes, from Joomla_5.2.4-Stable-Full_Package.zip
Raw History Compare with 5.2.3
md5
cc6087bee6459fe4d33deb78b86ebd21
sha1
9f891029e6f5f18f20ded9ecaa53cb93aebb71ba
sha256
f5a25e5c64bb553972654e5bac52acde1f436948f1b563d394dc1e6abd2596fe
<?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\Event\DispatcherInterface;
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,
            function (Container $container) {
                $plugin     = new Url(
                    $container->get(DispatcherInterface::class),
                    (array) PluginHelper::getPlugin('fields', 'url')
                );
                $plugin->setApplication(Factory::getApplication());

                return $plugin;
            }
        );
    }
};

The same content is in 77 releases, Joomla 5.0.0-rc to 6.0.0-beta1. See them all, or every version of this file.