CoreFiles by mySites.guru
provider.php46 lines, 1,255 bytes, from Joomla_6.0.1-Stable-Full_Package.zip
Raw History Compare with 6.0.0
md5
c058d25638c0d148aeff0d95fae3526b
sha1
2660cd3b6ec03da1364ca75a82038793f166e47a
sha256
d61b044f624a81e20211023865e955c1957f8b1efa23f7530e358a4ac7d379e8
<?php

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

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 Note(
                    $container->get(DispatcherInterface::class),
                    (array) PluginHelper::getPlugin('fields', 'note')
                );
                $plugin->setApplication(Factory::getApplication());

                return $plugin;
            }
        );
    }
};

The same content is in 15 releases, Joomla 6.0.0-beta1 to 6.1.0-alpha2. See them all, or every version of this file.