CoreFiles by mySites.guru
provider.php48 lines, 1,331 bytes, from Joomla_4.3.2-Stable-Full_Package.zip
Raw History Compare with 4.3.1
md5
5bd18c4d6c184f7268fadef1784e0e71
sha1
899d28ddceed8203c9c4fc0eef4217a26070b5cd
sha256
77a77c263e8c1107f9ba4b7ea6b93020eed7089dba28dd469d9947efe5c43921
<?php

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

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 Article(
                    $dispatcher,
                    (array) PluginHelper::getPlugin('editors-xtd', 'article')
                );
                $plugin->setApplication(Factory::getApplication());

                return $plugin;
            }
        );
    }
};

The same content is in 54 releases, Joomla 4.3.0-beta1 to 5.0.0-alpha1. See them all, or every version of this file.