CoreFiles by mySites.guru
provider.php45 lines, 1,302 bytes, from Joomla_6.2.0-Stable-Full_Package.zip
Raw History Compare with 6.1.4
md5
3018765bbe0ff9875f09e99573a2f1bd
sha1
740ddf1fa6664bb8dcbd4d60e2452b1a42f84fab
sha256
5d7534b439a0f0b6d85e2ad7ddc6da3b61f08c1946de2a181bda35d0685fb5a0
<?php

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

return new class () implements ServiceProviderInterface {
    /**
     * Registers the service provider with a DI container.
     *
     * @param   Container  $container  The DI container.
     *
     * @return  void
     *
     * @since   4.0.0
     */
    public function register(Container $container)
    {
        $container->set(
            PluginInterface::class,
            $container->lazy(Joomlaupdate::class, function (Container $container) {
                $plugin = new Joomlaupdate(
                    Factory::getApplication()->getDocument(),
                    (array) PluginHelper::getPlugin('quickicon', 'joomlaupdate')
                );
                $plugin->setApplication(Factory::getApplication());

                return $plugin;
            })
        );
    }
};

The same content is in 29 releases, Joomla 6.1.0-beta1 to 6.2.1. See them all, or every version of this file.