]> git.immae.eu Git - github/wallabag/wallabag.git/blame - src/Wallabag/CoreBundle/DependencyInjection/WallabagCoreExtension.php
Fix issue #1991: correction of the height field to add articles
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / DependencyInjection / WallabagCoreExtension.php
CommitLineData
9d50517c
NL
1<?php
2
ad4d1caa 3namespace Wallabag\CoreBundle\DependencyInjection;
9d50517c 4
9d50517c 5use Symfony\Component\Config\FileLocator;
619cc453 6use Symfony\Component\DependencyInjection\ContainerBuilder;
769e19dc 7use Symfony\Component\DependencyInjection\Loader;
619cc453 8use Symfony\Component\HttpKernel\DependencyInjection\Extension;
9d50517c 9
ad4d1caa 10class WallabagCoreExtension extends Extension
9d50517c
NL
11{
12 public function load(array $configs, ContainerBuilder $container)
13 {
c89d35e8
NL
14 $configuration = new Configuration();
15 $config = $this->processConfiguration($configuration, $configs);
bc789687 16
c89d35e8 17 $container->setParameter('wallabag_core.languages', $config['languages']);
bc789687
JB
18 $container->setParameter('wallabag_core.items_on_page', $config['items_on_page']);
19 $container->setParameter('wallabag_core.theme', $config['theme']);
20 $container->setParameter('wallabag_core.language', $config['language']);
21 $container->setParameter('wallabag_core.rss_limit', $config['rss_limit']);
bca54859 22 $container->setParameter('wallabag_core.reading_speed', $config['reading_speed']);
63e40f2d
JB
23 $container->setParameter('wallabag_core.version', $config['version']);
24 $container->setParameter('wallabag_core.paypal_url', $config['paypal_url']);
c89d35e8 25
769e19dc 26 $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
7ffb1e80 27 $loader->load('services.yml');
39f27d63 28 $loader->load('parameters.yml');
9d50517c
NL
29 }
30
31 public function getAlias()
32 {
ad4d1caa 33 return 'wallabag_core';
9d50517c
NL
34 }
35}