2018-02-08 22:23:42 +01:00
|
|
|
<?php
|
|
|
|
|
|
2022-11-29 11:05:30 +01:00
|
|
|
declare(strict_types=1);
|
2018-02-08 22:23:42 +01:00
|
|
|
|
|
|
|
|
namespace Netzmacht\Contao\Leaflet\GeocodeWidget\DependencyInjection;
|
|
|
|
|
|
|
|
|
|
use Symfony\Component\Config\FileLocator;
|
|
|
|
|
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
|
|
|
|
use Symfony\Component\DependencyInjection\Extension\Extension;
|
|
|
|
|
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
|
|
|
|
|
|
2022-11-29 11:05:30 +01:00
|
|
|
use function dirname;
|
|
|
|
|
|
2018-02-08 22:23:42 +01:00
|
|
|
class LeafletGeocodeWidgetExtension extends Extension
|
|
|
|
|
{
|
|
|
|
|
/**
|
|
|
|
|
* {@inheritdoc}
|
|
|
|
|
*/
|
2022-11-29 11:05:30 +01:00
|
|
|
public function load(array $configs, ContainerBuilder $container): void
|
2018-02-08 22:23:42 +01:00
|
|
|
{
|
|
|
|
|
$loader = new YamlFileLoader(
|
|
|
|
|
$container,
|
|
|
|
|
new FileLocator(dirname(__DIR__) . '/Resources/config')
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
$loader->load('listeners.yml');
|
|
|
|
|
}
|
|
|
|
|
}
|