CoreFiles by mySites.guru
provider.php42 lines, 1,077 bytes, from Joomla_6.0.2-Stable-Full_Package.zip
Raw History Compare with 6.0.1
md5
f437de7e6f1e69741def0e6ead536ce4
sha1
f762155c837409daff15dde146d36cd1851153c5
sha256
1502bc95b1bc59f0ae218a1a1a5a11d5412ebdce8f9e70268d9d854f85d5aca6
<?php

/**
 * @package     Joomla.Plugin
 * @subpackage  Content.fields
 *
 * @copyright   (C) 2022 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\Plugin\PluginHelper;
use Joomla\DI\Container;
use Joomla\DI\ServiceProviderInterface;
use Joomla\Plugin\Content\Fields\Extension\Fields;

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 Fields(
                    (array) PluginHelper::getPlugin('content', 'fields')
                );

                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.