CoreFiles by mySites.guru
provider.php44 lines, 1,217 bytes, from Joomla_6.2.0-Stable-Full_Package.zip
Raw History Compare with 6.1.4
md5
113d1e5a98b8adf048fa13324bc8fb8b
sha1
51ab121db0abbbcc0db5537395c7bfad49a24ab6
sha256
5e19d54a107257c465775149f6257dc85d7c24755b6d2028a2c433ad2da1de84
<?php

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

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