CoreFiles by mySites.guru
provider.php47 lines, 1,343 bytes, from Joomla_5.0.0-alpha1-Alpha-Full_Package.zip
Raw History Compare with 4.4.0-alpha4
md5
b3fae498a215279b1d5b4db439342412
sha1
aa03a4e63e11c9ce40f1bc23ae345a5a7b61d6ad
sha256
c7dd01e3d15ef737109f67576a0b954b7dd221b998b072adc8a6963070e12f72
<?php

/**
 * @package     Joomla.Plugin
 * @subpackage  Workflow.publishing
 *
 * @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\Workflow\Publishing\Extension\Publishing;

return new class () implements ServiceProviderInterface {
    /**
     * Registers the service provider with a DI container.
     *
     * @param   Container  $container  The DI container.
     *
     * @return  void
     *
     * @since   5.0.0
     */
    public function register(Container $container): void
    {
        $container->set(
            PluginInterface::class,
            function (Container $container) {
                $dispatcher = $container->get(DispatcherInterface::class);
                $plugin     = new Publishing(
                    $dispatcher,
                    (array) PluginHelper::getPlugin('workflow', 'publishing')
                );
                $plugin->setApplication(Factory::getApplication());

                return $plugin;
            }
        );
    }
};

No other release has this exact content. See every version of this file.