CoreFiles by mySites.guru
provider.php44 lines, 1,224 bytes, from Joomla_6.2.0-Stable-Full_Package.zip
Raw History Compare with 6.1.4
md5
76e94055194c35a1e8b7f096c3339c9a
sha1
2d42e310b83fa16d8b8deafbd4ef86f613b2d6f8
sha256
4a4fe3f86fbb42ced84a596242fa2373947fc5784340aa9a8d7b53b46d0df6f6
<?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\ReadMore\Extension\ReadMore;

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