CoreFiles by mySites.guru
provider.php46 lines, 1,376 bytes, from Joomla_6.2.1-Stable-Full_Package.zip
Raw History Compare with 6.2.0
md5
433d66141edf8d99d790987c87c117ab
sha1
5d9cb7806fedfc2f56cad8f32ab241663ea788db
sha256
84f86342255fd442eed19156d0e499051aa60f720e0e279b68ce36a484fafd12
<?php

/**
 * @package     Joomla.Plugin
 * @subpackage  Content.pagenavigation
 *
 * @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\Database\DatabaseInterface;
use Joomla\DI\Container;
use Joomla\DI\ServiceProviderInterface;
use Joomla\Plugin\Content\PageNavigation\Extension\PageNavigation;

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

                return $plugin;
            })
        );
    }
};

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