Files

45 lines
1.3 KiB
PHP
Raw Permalink Normal View History

<?php
/**
* @package MokoJoomOpenGraph
* @subpackage plg_content_mokoog
* @author Moko Consulting <hello@mokoconsulting.tech>
* @copyright Copyright (C) 2026 Moko Consulting. All rights reserved.
* @license GNU General Public License version 3 or later; see LICENSE
*/
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\Content\MokoOG\Extension\MokoOGContent;
return new class () implements ServiceProviderInterface {
/**
* Register the service provider.
*
* @param Container $container The DI container
*
* @return void
*/
public function register(Container $container): void
{
$container->set(
PluginInterface::class,
function (Container $container) {
$plugin = new MokoOGContent(
$container->get(DispatcherInterface::class),
(array) PluginHelper::getPlugin('content', 'mokoog')
);
$plugin->setApplication(Factory::getApplication());
return $plugin;
}
);
}
};