CoreFiles by mySites.guru
provider.php42 lines, 1,128 bytes, from Joomla_6.1.2-Stable-Full_Package.zip
Raw History Compare with 6.1.1
md5
fe04e445fd9e8b12b1aae0163674e6d8
sha1
e022ba2f94d8b97313cc14b03d8cce8da65b877a
sha256
06ba288011f89f2fe75974e9006535b74e7187f623db53e0798880cdf1b9a05f
<?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\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,
            $container->lazy(Taggable::class, function (Container $container) {
                $plugin     = new Taggable(
                    (array) PluginHelper::getPlugin('behaviour', 'taggable')
                );

                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.