CoreFiles by mySites.guru
provider.php47 lines, 1,181 bytes, from Joomla_4.1.2-Stable-Full_Package.zip
Raw History Compare with 4.1.1
md5
b9caa1590bce52530597d23722c75c42
sha1
75d6cbb356cf60d2dffac5eca802d233c37d4375
sha256
125b427e33ffdfa83463bf39c1f936f51b953962b5d091ff178d12524ce783e0
<?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\DI\Container;
use Joomla\DI\ServiceProviderInterface;
use Joomla\Event\DispatcherInterface;
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,
			function (Container $container)
			{
				// @Todo This needs to be changed to a proper factory
				$plugin = \Joomla\CMS\Plugin\PluginHelper::getPlugin('quickicon', 'joomlaupdate');

				return new Joomlaupdate(
					$container->get(DispatcherInterface::class),
					Factory::getApplication()->getDocument(),
					(array) $plugin
				);
			}
		);
	}
};

The same content is in 48 releases, Joomla 4.0.0-rc1 to 4.2.0-beta1. See them all, or every version of this file.