75c34345f9
Generic: Repo Health / Site Health (push) Has been cancelled
Generic: Repo Health / Access control (push) Has been cancelled
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled
Generic: Repo Health / Report Issues (push) Has been cancelled
Rename root source directory from src/ to source/ and update all references in Makefile, manifest.xml, .gitignore, CI workflows, and wiki documentation. Internal Joomla namespace paths (src/Extension) are unchanged as they are plugin-internal structure. CI workflows updated to check source/ first with src/ fallback for backward compatibility across repos. Authored-by: Moko Consulting Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
49 lines
1.7 KiB
PHP
49 lines
1.7 KiB
PHP
<?php
|
|
|
|
/**
|
|
* @package MokoJoomCross
|
|
* @subpackage com_mokojoomcross
|
|
* @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
|
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
|
*/
|
|
|
|
defined('_JEXEC') or die;
|
|
|
|
use Joomla\CMS\Dispatcher\ComponentDispatcherFactoryInterface;
|
|
use Joomla\CMS\Extension\ComponentInterface;
|
|
use Joomla\CMS\Extension\Service\Provider\ComponentDispatcherFactory;
|
|
use Joomla\CMS\Extension\Service\Provider\MVCFactory;
|
|
use Joomla\CMS\MVC\Factory\MVCFactoryInterface;
|
|
use Joomla\Component\MokoJoomCross\Administrator\Extension\MokoJoomCrossComponent;
|
|
use Joomla\DI\Container;
|
|
use Joomla\DI\ServiceProviderInterface;
|
|
|
|
return new class () implements ServiceProviderInterface {
|
|
/**
|
|
* Register the service provider.
|
|
*
|
|
* @param Container $container The DI container
|
|
*
|
|
* @return void
|
|
*/
|
|
public function register(Container $container): void
|
|
{
|
|
$container->registerServiceProvider(new MVCFactory('\\Joomla\\Component\\MokoJoomCross'));
|
|
$container->registerServiceProvider(new ComponentDispatcherFactory('\\Joomla\\Component\\MokoJoomCross'));
|
|
|
|
$container->set(
|
|
ComponentInterface::class,
|
|
function (Container $container) {
|
|
$component = new MokoJoomCrossComponent(
|
|
$container->get(ComponentDispatcherFactoryInterface::class)
|
|
);
|
|
$component->setMVCFactory($container->get(MVCFactoryInterface::class));
|
|
|
|
return $component;
|
|
}
|
|
);
|
|
}
|
|
};
|