30 lines
1 KiB
PHP
30 lines
1 KiB
PHP
<?php
|
|
|
|
namespace Catalyst\MenuBundle\DependencyInjection;
|
|
|
|
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
|
use Symfony\Component\DependencyInjection\Extension\Extension;
|
|
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
|
|
use Symfony\Component\Config\FileLocator;
|
|
|
|
class CatalystMenuExtension extends Extension
|
|
{
|
|
public function load(array $configs, ContainerBuilder $container)
|
|
{
|
|
$loader = new YamlFileLoader(
|
|
$container,
|
|
new FileLocator(__DIR__ . '/../Resources/config')
|
|
);
|
|
$loader->load('services.yaml');
|
|
|
|
// NOTE: cannot use processConfiguration here since having the key as an identifier
|
|
// will break across multiple configuration files.
|
|
// Issue can be found here: https://github.com/symfony/symfony/issues/29817
|
|
|
|
// $data = $this->processConfigs($configs);
|
|
|
|
// set acl data for main acl generator
|
|
$def = $container->getDefinition('catalyst_menu.generator');
|
|
$def->replaceArgument('$menu_data', $configs);
|
|
}
|
|
}
|