CoreFiles by mySites.guru
provider.php49 lines, 1,318 bytes, from Joomla_4.3.0-alpha3-Alpha-Full_Package.zip
Raw History Compare with 4.3.0-alpha2
md5
a837bd5139516e3ae7f2af82fb5771ba
sha1
dd32861adcd5b9c7e15a095ebab5174db3402d65
sha256
6295e8b15b1b592c16927d1a7767a7acb421ae50a293e2f70ba2ac0113a31987
<?php

/**
 * @package     Joomla.Plugin
 * @subpackage  Editors-xtd.image
 *
 * @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\EditorsXtd\Image\Extension\Image;

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) {
                $dispatcher = $container->get(DispatcherInterface::class);

                $plugin     = new Image(
                    $dispatcher,
                    (array) PluginHelper::getPlugin('editors-xtd', 'image')
                );
                $plugin->setApplication(Factory::getApplication());

                return $plugin;
            }
        );
    }
};

No other release has this exact content. See every version of this file.