| Server IP : 54.36.91.62 / Your IP : 216.73.217.112 Web Server : Apache System : Linux webm013.cluster127.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64 User : coopiak ( 151928) PHP Version : 8.3.23 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/coopiak/amisdesseniors-fr/plugins/editors-xtd/modals/services/ |
Upload File : |
<?php
/**
* @package Modals
* @version 14.5.5
*
* @author Peter van Westen <info@regularlabs.com>
* @link https://regularlabs.com
* @copyright Copyright © 2025 Regular Labs All Rights Reserved
* @license GNU General Public License version 2 or later
*/
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 RegularLabs\Plugin\EditorButton\Modals\Extension\Modals;
use RegularLabs\Plugin\EditorButton\Modals\Extension\ModalsJ4;
defined('_JEXEC') or die;
if (version_compare(JVERSION, 4, '<') || version_compare(JVERSION, 7, '>='))
{
return;
}
if ( ! is_file(JPATH_LIBRARIES . '/regularlabs/regularlabs.xml')
|| ! class_exists('RegularLabs\Library\Plugin\EditorButton')
)
{
return;
}
return new class () implements ServiceProviderInterface {
public function register(Container $container)
{
$container->set(
PluginInterface::class,
function (Container $container) {
$class = JVERSION < 5 ? ModalsJ4::class : Modals::class;
$dispatcher = $container->get(DispatcherInterface::class);
$plugin = new $class(
$dispatcher,
(array) PluginHelper::getPlugin('editors-xtd', 'modals')
);
$plugin->setApplication(Factory::getApplication());
return $plugin;
}
);
}
};