CoreFiles by mySites.guru
provider.php44 lines, 1,199 bytes, from Joomla_6.1.4-Stable-Full_Package.zip
Raw History Compare with 6.1.3
md5
a70cde8c06074044712b2fdc60f01e11
sha1
50fdae8df01e9c31cd39bfa6bf9a19f60cc71710
sha256
8240fd5845bb7570e95e5eb0256e71a711741cd2186eaaf541f375bd16ae45b1
<?php

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

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