- md5
- ca1375c9ea5c782ae09293c8a4a91224
- sha1
- 5d4eab9438e24c9b981ae9555f0f6589b89e57ab
- sha256
- de0e08cb6fc941fb42813592a0263c52c1ad0e70dcc05db699da22bdaa78f97d
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
<?php
/**
* @package Joomla.Plugin
* @subpackage System.guidedtours
*
* @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\Application\ApplicationInterface;
use Joomla\CMS\Extension\PluginInterface;
use Joomla\CMS\Factory;
use Joomla\CMS\Plugin\PluginHelper;
use Joomla\CMS\WebAsset\WebAssetRegistry;
use Joomla\DI\Container;
use Joomla\DI\ServiceProviderInterface;
use Joomla\Event\DispatcherInterface;
use Joomla\Plugin\System\GuidedTours\Extension\GuidedTours;
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);
$app = Factory::getApplication();
$plugin = new GuidedTours(
$dispatcher,
(array) PluginHelper::getPlugin('system', 'guidedtours'),
$app->isClient('administrator')
);
$plugin->setApplication($app);
$wa = $container->get(WebAssetRegistry::class);
$wa->addRegistryFile('media/plg_system_guidedtours/joomla.asset.json');
return $plugin;
}
);
}
};
The same content is in 15 releases, Joomla 4.3.0-rc1 to 5.0.0-alpha1. See them all, or every version of this file.