- md5
- 7fa0ee5618cee94ffb187329408c1e70
- sha1
- 62da9f2aa8e689ae01b87571fac396188e03a330
- sha256
- d5a8a7e95194b08d17c015a77b0ce46c725e3907037b4282eee3621c1ff82bd2
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
<?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\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 35 releases, Joomla 4.4.0-alpha3 to 4.4.14. See them all, or every version of this file.