Add config and controller to use the config

This commit is contained in:
Tim
2020-07-27 00:26:57 +02:00
parent a2c17d4be3
commit db970b4c69
6 changed files with 115 additions and 5 deletions

View File

@ -2,7 +2,6 @@
namespace Ardent\ParameterBundle\DependencyInjection;
use Ardent\ParameterBundle\Entity\Parameter;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Extension\Extension;
@ -14,8 +13,14 @@ class ArdentParameterExtension extends Extension
{
$loader = new YamlFileLoader(
$container,
new FileLocator(__DIR__.'/../Resources/config')
new FileLocator(dirname(__DIR__).'/Resources/config')
);
$loader->load('services.yaml');
$configuration = new Configuration();
$config = $this->processConfiguration($configuration, $configs);
$def = $container->findDefinition('ardent.parameter');
$def->setArgument('$config', $config['parameters']);
}
}