CoreFiles by mySites.guru
provider.php49 lines, 1,445 bytes, from Joomla_6.0.0-alpha1-Alpha-Full_Package.zip
Raw History Compare with 5.4.0-alpha3
md5
ed5aa66338fbc3aeae0764b05b17fb11
sha1
8c4c6b614ce794fea17d4b5fb5a3753bffcfed6e
sha256
d8f9367d3893de293cb1ade80d951a172869c62c6cef203489765bac5feb47d9
<?php

/**
 * @package     Joomla.Plugin
 * @subpackage  Quickicon.Autoupdate
 *
 * @copyright   (C) 2025 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\DI\Container;
use Joomla\DI\ServiceProviderInterface;
use Joomla\Event\DispatcherInterface;
use Joomla\Plugin\Quickicon\Autoupdate\Extension\Autoupdate;

return new class () implements ServiceProviderInterface {
    /**
     * Registers the service provider with a DI container.
     *
     * @param   Container  $container  The DI container.
     *
     * @return  void
     *
     * @since   6.0.0
     */
    public function register(Container $container)
    {
        $container->set(
            PluginInterface::class,
            function (Container $container) {
                // @Todo This needs to be changed to a proper factory
                $plugin = \Joomla\CMS\Plugin\PluginHelper::getPlugin('quickicon', 'autoupdate');

                $plugin = new Autoupdate(
                    $container->get(DispatcherInterface::class),
                    Factory::getApplication()->getDocument(),
                    (array) $plugin
                );
                $plugin->setApplication(Factory::getApplication());

                return $plugin;
            }
        );
    }
};

No other release has this exact content. See every version of this file.