CoreFiles by mySites.guru
provider.php44 lines, 1,187 bytes, from Joomla_6.1.3-Stable-Full_Package.zip
Raw History Compare with 6.1.2
md5
8c69fc463983758fd8b164c8743f1634
sha1
a9a420e7dbb06ce479236f2b45860ffa89e65973
sha256
66276994927a38e074637a2093427fdb9a4a36e6dc422e4c31cbad151448a848
<?php

/**
 * @package     Joomla.Plugin
 * @subpackage  Fields.text
 *
 * @copyright   (C) 2023 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\Fields\Text\Extension\Text;

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

                return $plugin;
            })
        );
    }
};

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