X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2FWallabag%2FCoreBundle%2FDependencyInjection%2FWallabagCoreExtension.php;h=9ff9b732f0b972d99ce287e17b1fc757bfe2beca;hb=86719c63bf47686ca55020e6b0443344de36d45a;hp=c6ecc99e00145afaec17737fb30cb8ea9c9258c6;hpb=2c0ffcf3972e2f58267b805a26835f452e016761;p=github%2Fwallabag%2Fwallabag.git diff --git a/src/Wallabag/CoreBundle/DependencyInjection/WallabagCoreExtension.php b/src/Wallabag/CoreBundle/DependencyInjection/WallabagCoreExtension.php index c6ecc99e..9ff9b732 100644 --- a/src/Wallabag/CoreBundle/DependencyInjection/WallabagCoreExtension.php +++ b/src/Wallabag/CoreBundle/DependencyInjection/WallabagCoreExtension.php @@ -2,16 +2,20 @@ namespace Wallabag\CoreBundle\DependencyInjection; +use Symfony\Component\Config\FileLocator; use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Loader\YamlFileLoader; +use Symfony\Component\DependencyInjection\Loader; use Symfony\Component\HttpKernel\DependencyInjection\Extension; -use Symfony\Component\Config\FileLocator; class WallabagCoreExtension extends Extension { public function load(array $configs, ContainerBuilder $container) { - $loader = new YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); + $configuration = new Configuration(); + $config = $this->processConfiguration($configuration, $configs); + $container->setParameter('wallabag_core.languages', $config['languages']); + + $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); $loader->load('services.yml'); }