CoreFiles by mySites.guru
provider.php48 lines, 1,362 bytes, from Joomla_4.3.0-alpha2-Alpha-Full_Package.zip
Raw History Compare with 4.3.0-alpha1
md5
e0f04f83f761d1cefb757f9effb7b653
sha1
846445ed3f395b836c6acdc65969452ab46617d9
sha256
6bb2eb200e1ffeda28b7f3b1693e94e824d5518190bbd3cd4e273b998abe5124
<?php

/**
 * @package     Joomla.Plugin
 * @subpackage  Quickicon.extensionupdate
 *
 * @copyright   (C) 2022 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\Quickicon\Extensionupdate\Extension\Extensionupdate;

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 Extensionupdate(
                    $dispatcher,
                    (array) PluginHelper::getPlugin('quickicon', 'extensionupdate')
                );
                $plugin->setApplication(Factory::getApplication());

                return $plugin;
            }
        );
    }
};

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