- md5
- 34d5c4011c23fb1860eb2ef29e511999
- sha1
- b28f5ec31938ec9a33a325e1b6b4d0c34e0e021e
- sha256
- 874c9abd6089fed57030d6d345d4f30c18d1902b7cfa5defb43f32a216cdea62
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
<?php
/**
* @package Joomla.Administrator
* @subpackage com_fields
*
* @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\Categories\CategoryFactoryInterface;
use Joomla\CMS\Dispatcher\ComponentDispatcherFactoryInterface;
use Joomla\CMS\Extension\ComponentInterface;
use Joomla\CMS\Extension\MVCComponent;
use Joomla\CMS\Extension\Service\Provider\CategoryFactory;
use Joomla\CMS\Extension\Service\Provider\ComponentDispatcherFactory;
use Joomla\CMS\Extension\Service\Provider\MVCFactory;
use Joomla\CMS\HTML\Registry;
use Joomla\CMS\MVC\Factory\MVCFactoryInterface;
use Joomla\Component\Fields\Administrator\Extension\FieldsComponent;
use Joomla\DI\Container;
use Joomla\DI\ServiceProviderInterface;
/**
* The fields service provider.
*
* @since 4.0.0
*/
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->registerServiceProvider(new CategoryFactory('\\Joomla\\Component\\Fields'));
$container->registerServiceProvider(new MVCFactory('\\Joomla\\Component\\Fields'));
$container->registerServiceProvider(new ComponentDispatcherFactory('\\Joomla\\Component\\Fields'));
$container->set(
ComponentInterface::class,
function (Container $container)
{
$component = new FieldsComponent($container->get(ComponentDispatcherFactoryInterface::class));
$component->setMVCFactory($container->get(MVCFactoryInterface::class));
$component->setCategoryFactory($container->get(CategoryFactoryInterface::class));
return $component;
}
);
}
};
No other release has this exact content. See every version of this file.