CoreFiles by mySites.guru
provider.php47 lines, 1,301 bytes, from Joomla_4.3.2-Stable-Full_Package.zip
Raw History Compare with 4.3.1
md5
7ff1c5e248216df3f5e3efa7c6893bdf
sha1
2f3dace456df8750e97fbedf9ffb781fbd32b8c8
sha256
baebe656123ad142afbf42fe72ebb8dc3fe0e9403beb1c7e73c03b3e1e2e71b6
<?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\Event\DispatcherInterface;
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,
            function (Container $container) {
                $dispatcher = $container->get(DispatcherInterface::class);
                $plugin     = new Text(
                    $dispatcher,
                    (array) PluginHelper::getPlugin('fields', 'text')
                );
                $plugin->setApplication(Factory::getApplication());

                return $plugin;
            }
        );
    }
};

The same content is in 54 releases, Joomla 4.3.0-beta1 to 5.0.0-alpha1. See them all, or every version of this file.