CoreFiles by mySites.guru
provider.php47 lines, 1,189 bytes, from Joomla_4.0.0-alpha10-Alpha-Full_Package.zip
Raw History Compare with 4.0.0-alpha9
md5
d0b2218cd6b87aafe59ece114be9d5ec
sha1
4a1958a9dce08a4a85089e126a68ed7e902276aa
sha256
3817b2cc1e951eeededeb4f7635b79ecb70f3def89db9ce2bb900f0a76571928
<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_content
 *
 * @copyright   Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
 * @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 2 releases, Joomla 4.0.0-alpha9 to 4.0.0-alpha10. See them all, or every version of this file.