CoreFiles by mySites.guru
provider.php44 lines, 1,204 bytes, from Joomla_6.1.0-Stable-Full_Package.zip
Raw History Compare with 6.0.4
md5
1611be0dc8dfd05129d222273119cb31
sha1
5b33fc2eb224e2a68146a4d14651485a19c8b0b6
sha256
f80594a6938eb3742e074cf3faf1deb30baa460e68751f951def947bd38070c4
<?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\Plugin\EditorsXtd\Menu\Extension\Menu;

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(Menu::class, function (Container $container) {
                $plugin     = new Menu(
                    (array) PluginHelper::getPlugin('editors-xtd', 'menu')
                );
                $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.