generated from MokoConsulting/Template-Joomla
28 lines
756 B
PHP
28 lines
756 B
PHP
<?php
|
|
|
|
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 Moko\Plugin\System\MokoSuiteSupport\Extension\Support;
|
|
|
|
return new class implements ServiceProviderInterface
|
|
{
|
|
public function register(Container $container): void
|
|
{
|
|
$container->set(
|
|
PluginInterface::class,
|
|
function (Container $container) {
|
|
$dispatcher = $container->get(DispatcherInterface::class);
|
|
$plugin = new Support($dispatcher, (array) PluginHelper::getPlugin('system', 'mokosuitesupport'));
|
|
$plugin->setApplication(Factory::getApplication());
|
|
return $plugin;
|
|
}
|
|
);
|
|
}
|
|
};
|