26 lines
647 B
PHP
26 lines
647 B
PHP
<?php
|
|
|
|
defined('_JEXEC') or die;
|
|
|
|
use Joomla\CMS\Component\Router\RouterServiceInterface;
|
|
use Joomla\CMS\Component\Router\RouterFactoryInterface;
|
|
use Joomla\CMS\Router\Route;
|
|
|
|
return [
|
|
'services' => [
|
|
RouterServiceInterface::class => function (RouterFactoryInterface $routerFactory) {
|
|
$router = $routerFactory->create('site');
|
|
|
|
$router->addRoute(
|
|
'com_leaflet',
|
|
[
|
|
'pattern' => 'ajax',
|
|
'controller' => 'ajax',
|
|
'task' => 'myAjaxFunction',
|
|
]
|
|
);
|
|
return $router;
|
|
},
|
|
],
|
|
];
|