CoreFiles by mySites.guru
provider.php44 lines, 1,195 bytes, from Joomla_5.0.0-alpha3-Alpha-Full_Package.zip
Raw History Compare with 5.0.0-alpha2
md5
58c57911219d0a3e68325d59a2394bd8
sha1
9fd318a486444b00c434c4c54c0c8bc4a60b5382
sha256
66e7cf8bb54a8e94274b9229091dc16ef2f92132fd41bd8847680f4a3c30ca5e
<?php

/**
 * @package     Joomla.Plugin
 * @subpackage  Behaviour.taggable
 *
 * @copyright   (C) 2022 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\Plugin\PluginHelper;
use Joomla\DI\Container;
use Joomla\DI\ServiceProviderInterface;
use Joomla\Event\DispatcherInterface;
use Joomla\Plugin\Behaviour\Taggable\Extension\Taggable;

return new class () implements ServiceProviderInterface {
    /**
     * Registers the service provider with a DI container.
     *
     * @param   Container  $container  The DI container.
     *
     * @return  void
     *
     * @since   4.2.0
     */
    public function register(Container $container)
    {
        $container->set(
            PluginInterface::class,
            function (Container $container) {
                $plugin     = new Taggable(
                    $container->get(DispatcherInterface::class),
                    (array) PluginHelper::getPlugin('behaviour', 'taggable')
                );

                return $plugin;
            }
        );
    }
};

The same content is in 6 releases, Joomla 5.0.0-alpha2 to 5.0.0-beta3. See them all, or every version of this file.